[#4420] Updated the flash messages for Deliverables.

This commit is contained in:
Eric Davis
2010-09-09 15:12:01 -07:00
parent 1b08487a0d
commit 362610dc77
2 changed files with 7 additions and 3 deletions
+3 -3
View File
@@ -17,13 +17,13 @@ class DeliverablesController < InheritedResources::Base
if params[:deliverable] && params[:deliverable][:type] && Deliverable.valid_types.include?(params[:deliverable][:type])
@deliverable.type = params[:deliverable][:type]
end
create! { contract_url(@project, @contract) }
create!(:notice => l(:text_flash_deliverable_created, :name => @deliverable.title)) { contract_url(@project, @contract) }
end
def update
@deliverable = begin_of_association_chain.deliverables.find_by_id(params[:id])
params[:deliverable] = params[:fixed_deliverable] || params[:hourly_deliverable] || params[:retainer_deliverable]
update! { contract_url(@project, @contract) }
update!(:notice => l(:text_flash_deliverable_updated, :name => @deliverable.title)) { contract_url(@project, @contract) }
end
def show
@@ -36,7 +36,7 @@ class DeliverablesController < InheritedResources::Base
end
def destroy
destroy! { contract_url(@project, @contract) }
destroy!(:notice => l(:text_flash_deliverable_destroyed, :name => resource.title)) { contract_url(@project, @contract) }
end
protected
+4
View File
@@ -67,3 +67,7 @@ en:
text_changed_period_message: "The period for this deliverable has been changed. Would you like to expand/shrink the Deliverable Finances?"
field_current_period: "Current period"
text_retainer_monthly_message: "For a single month"
text_flash_deliverable_created: "Deliverable: {{name}} was successfully created."
text_flash_deliverable_updated: "Deliverable: {{name}} was successfully updated."
text_flash_deliverable_destroyed: "Deliverable: {{name}} was successfully destroyed."