From f65970427582e6a265e2c86b4d167e7f12bbbcfc Mon Sep 17 00:00:00 2001 From: Christian Rijke Date: Thu, 31 Oct 2013 16:53:30 +0100 Subject: [PATCH] Fix context menu link. --- .../costs/_view_work_packages_context_menu_end.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/hooks/costs/_view_work_packages_context_menu_end.html.erb b/app/views/hooks/costs/_view_work_packages_context_menu_end.html.erb index ceafe57217..4119bf167d 100644 --- a/app/views/hooks/costs/_view_work_packages_context_menu_end.html.erb +++ b/app/views/hooks/costs/_view_work_packages_context_menu_end.html.erb @@ -12,8 +12,9 @@ <% unless possible_cost_objects.empty? -%> <% possible_cost_objects.each do |co| -%>
  • - <%= context_menu_link co.subject, {:controller => '/issues', :action => 'bulk_edit', :ids => issues.collect(&:id), 'cost_object_id' => co, :back_url => back}, :method => :post, - :selected => (issue && co == issue.cost_object), :disabled => !can[:edit] %> + <%= context_menu_link(co.subject, work_packages_bulk_path(ids: issues.collect(&:id), + work_package: { "cost_object_id" => co}, back_url: back), method: :put, + selected: (@work_package && co == @work_package.cost_object), disabled: !can[:edit]) %>
  • <% end -%> <% else -%>