summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-29 17:52:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-29 17:52:27 +0000
commitefc05bc73cf53e2c9d57147f7226f9b17a6350ce (patch)
tree3f7f5f239bf1e1a298f1d26cf459d0524fad3e4a /app/helpers
parent41e7210210b5e50bf57bbcf41259a4d343bba1f0 (diff)
downloadredmine-efc05bc73cf53e2c9d57147f7226f9b17a6350ce.tar.gz
redmine-efc05bc73cf53e2c9d57147f7226f9b17a6350ce.zip
Add time entries custom fields to the context menu for quick bulk edit (#17484).
git-svn-id: http://svn.redmine.org/redmine/trunk@13335 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/context_menus_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/context_menus_helper.rb b/app/helpers/context_menus_helper.rb
index 9dcfbc144..b97d9844a 100644
--- a/app/helpers/context_menus_helper.rb
+++ b/app/helpers/context_menus_helper.rb
@@ -40,4 +40,11 @@ module ContextMenusHelper
:method => :post,
:selected => (@issue && @issue.custom_field_value(field) == value)
end
+
+ def bulk_update_time_entry_custom_field_context_menu_link(field, text, value)
+ context_menu_link h(text),
+ bulk_update_time_entries_path(:ids => @time_entries.map(&:id), :time_entry => {'custom_field_values' => {field.id => value}}, :back_url => @back),
+ :method => :post,
+ :selected => (@time_entry && @time_entry.custom_field_value(field) == value)
+ end
end