diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-01-03 11:18:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-01-03 11:18:09 +0000 |
commit | cab99aa5adf918ac6de25001912ea34c598fac83 (patch) | |
tree | 19e8c5a6cace414de530201fd49fb4b2a07e4219 /app/helpers/custom_fields_helper.rb | |
parent | e9810b5de643513f73ea07445e7d7ded731ef446 (diff) | |
download | redmine-cab99aa5adf918ac6de25001912ea34c598fac83.tar.gz redmine-cab99aa5adf918ac6de25001912ea34c598fac83.zip |
Allow bulk edit custom fields of any type (#461).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3278 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/custom_fields_helper.rb')
-rw-r--r-- | app/helpers/custom_fields_helper.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index e11f7ccfe..330b1aa93 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -66,6 +66,26 @@ module CustomFieldsHelper def custom_field_tag_with_label(name, custom_value) custom_field_label_tag(name, custom_value) + custom_field_tag(name, custom_value) end + + def custom_field_tag_for_bulk_edit(custom_field) + field_name = "custom_field_values[#{custom_field.id}]" + field_id = "custom_field_values_#{custom_field.id}" + case custom_field.field_format + when "date" + text_field_tag(field_name, '', :id => field_id, :size => 10) + + calendar_for(field_id) + when "text" + text_area_tag(field_name, '', :id => field_id, :rows => 3, :style => 'width:90%') + when "bool" + select_tag(field_name, options_for_select([[l(:label_no_change_option), ''], + [l(:general_text_yes), '1'], + [l(:general_text_no), '0']]), :id => field_id) + when "list" + select_tag(field_name, options_for_select([[l(:label_no_change_option), '']] + custom_field.possible_values), :id => field_id) + else + text_field_tag(field_name, '', :id => field_id) + end + end # Return a string used to display a custom value def show_value(custom_value) |