Browse Source

code cleanup: rubocop: fix Layout/IndentAssignment in app/helpers/issues_helper.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18479 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.1.0
Toshi MARUYAMA 4 years ago
parent
commit
aa8c59a389
2 changed files with 3 additions and 6 deletions
  1. 0
    1
      .rubocop_todo.yml
  2. 3
    5
      app/helpers/issues_helper.rb

+ 0
- 1
.rubocop_todo.yml View File

@@ -248,7 +248,6 @@ Layout/ExtraSpacing:
Layout/IndentAssignment:
Exclude:
- 'app/helpers/application_helper.rb'
- 'app/helpers/issues_helper.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
- 'test/unit/lib/redmine/helpers/gantt_test.rb'


+ 3
- 5
app/helpers/issues_helper.rb View File

@@ -264,16 +264,14 @@ module IssuesHelper
def render_full_width_custom_fields_rows(issue)
values = issue.visible_custom_field_values.select {|value| value.custom_field.full_width_layout?}
return if values.empty?

s = ''.html_safe
values.each_with_index do |value, i|
attr_value_tag = custom_field_value_tag(value)
next if attr_value_tag.blank?

content =
content_tag('hr') +
content_tag('p', content_tag('strong', custom_field_name_tag(value.custom_field) )) +
content_tag('div', attr_value_tag, class: 'value')
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: "#{value.custom_field.css_classes} attribute")
end
s

Loading…
Cancel
Save