[#4420] Updated the flash messages for Deliverables.
This commit is contained in:
1 parent
1b08487a0d
commit
362610dc77
2 files changed
+7
-3
No files matched your search
@@ -17,13 +17,13 @@ class DeliverablesController < InheritedResources::Base
|
|||||||
if params[:deliverable] && params[:deliverable][:type] && Deliverable.valid_types.include?(params[:deliverable][:type])
|
if params[:deliverable] && params[:deliverable][:type] && Deliverable.valid_types.include?(params[:deliverable][:type])
|
||||||
@deliverable.type = params[:deliverable][:type]
|
@deliverable.type = params[:deliverable][:type]
|
||||||
end
|
end
|
||||||
create! { contract_url(@project, @contract) }
|
create!(:notice => l(:text_flash_deliverable_created, :name => @deliverable.title)) { contract_url(@project, @contract) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@deliverable = begin_of_association_chain.deliverables.find_by_id(params[:id])
|
@deliverable = begin_of_association_chain.deliverables.find_by_id(params[:id])
|
||||||
params[:deliverable] = params[:fixed_deliverable] || params[:hourly_deliverable] || params[:retainer_deliverable]
|
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
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@@ -36,7 +36,7 @@ class DeliverablesController < InheritedResources::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
destroy! { contract_url(@project, @contract) }
|
destroy!(:notice => l(:text_flash_deliverable_destroyed, :name => resource.title)) { contract_url(@project, @contract) }
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|||||||
@@ -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?"
|
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"
|
field_current_period: "Current period"
|
||||||
text_retainer_monthly_message: "For a single month"
|
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."
|
||||||
|
|
||||||
Reference in new issue
Block a user