diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-03-21 10:24:18 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-03-21 10:24:18 +0000 |
commit | ca2be43456cd94260c7dd79d55d0de36d593d8b3 (patch) | |
tree | 1d4935e5d12ae75220b0a4bf95385ff027de7a9e /app/helpers/custom_fields_helper.rb | |
parent | ab4916b01aa2901fa35d846598b266846b65dd8c (diff) | |
download | redmine-ca2be43456cd94260c7dd79d55d0de36d593d8b3.tar.gz redmine-ca2be43456cd94260c7dd79d55d0de36d593d8b3.zip |
Include custom fields description in project settings and issue view (#19296).
Patch by Sebastian Paluch.
git-svn-id: http://svn.redmine.org/redmine/trunk@14154 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/custom_fields_helper.rb')
-rw-r--r-- | app/helpers/custom_fields_helper.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index e0f3fa7d2..988d6532f 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -77,11 +77,16 @@ module CustomFieldsHelper :class => "#{custom_value.custom_field.field_format}_cf" end + # Return custom field name tag + def custom_field_name_tag(custom_field) + title = custom_field.description.presence + content_tag 'span', custom_field.name, :title => title + end + # Return custom field label tag def custom_field_label_tag(name, custom_value, options={}) required = options[:required] || custom_value.custom_field.is_required? - title = custom_value.custom_field.description.presence - content = content_tag 'span', custom_value.custom_field.name, :title => title + content = custom_field_name_tag custom_value.custom_field content_tag "label", content + (required ? " <span class=\"required\">*</span>".html_safe : ""), |