diff options
author | Go MAEDA <maeda@farend.jp> | 2019-03-09 15:38:24 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-03-09 15:38:24 +0000 |
commit | 1fbb2fa33aa1d4b257a759a35cb38353cdac4e9e (patch) | |
tree | 5f006ef4bb6b1b0ad99aab53239bfa099177d195 /app/helpers | |
parent | 12968c0843970676c4c1eb60d0d82f4dbaca5caa (diff) | |
download | redmine-1fbb2fa33aa1d4b257a759a35cb38353cdac4e9e.tar.gz redmine-1fbb2fa33aa1d4b257a759a35cb38353cdac4e9e.zip |
Move custom field classes to a method (#30994).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17937 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issues_helper.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 6bd8e2927..a3e655a30 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -243,9 +243,8 @@ module IssuesHelper half = (values.size / 2.0).ceil issue_fields_rows do |rows| values.each_with_index do |value, i| - css = "cf_#{value.custom_field.id}" m = (i < half ? :left : :right) - rows.send m, custom_field_name_tag(value.custom_field), custom_field_value_tag(value), :class => css + rows.send m, custom_field_name_tag(value.custom_field), custom_field_value_tag(value), :class => value.custom_field.css_classes end end end @@ -263,7 +262,7 @@ module IssuesHelper content_tag('hr') + content_tag('p', content_tag('strong', custom_field_name_tag(value.custom_field) )) + content_tag('div', attr_value_tag, class: 'value') - s << content_tag('div', content, class: "cf_#{value.custom_field.id} attribute") + s << content_tag('div', content, class: "#{value.custom_field.css_classes} attribute") end s end |