]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/AlignArguments in IssuesHelper#render_issue_relations
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Nov 2019 16:04:54 +0000 (16:04 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Nov 2019 16:04:54 +0000 (16:04 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19027 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/issues_helper.rb

index be20c59d498d55e25bf8deeb2444578bc2f8fb66..2ea81d56637f11cf1b0aad6fb6ad25b8b025a004 100644 (file)
@@ -146,39 +146,56 @@ module IssuesHelper
   # Renders the list of related issues on the issue details view
   def render_issue_relations(issue, relations)
     manage_relations = User.current.allowed_to?(:manage_issue_relations, issue.project)
-
     s = ''.html_safe
     relations.each do |relation|
       other_issue = relation.other_issue(issue)
       css = "issue hascontextmenu #{other_issue.css_classes}"
       buttons =
         if manage_relations
-          link_to(l(:label_relation_delete),
-                                  relation_path(relation),
-                                  :remote => true,
-                                  :method => :delete,
-                                  :data => {:confirm => l(:text_are_you_sure)},
-                                  :title => l(:label_relation_delete),
-                                  :class => 'icon-only icon-link-break'
-                                 )
+          link_to(
+            l(:label_relation_delete),
+            relation_path(relation),
+            :remote => true,
+            :method => :delete,
+            :data => {:confirm => l(:text_are_you_sure)},
+            :title => l(:label_relation_delete),
+            :class => 'icon-only icon-link-break'
+          )
         else
           "".html_safe
         end
       buttons << link_to_context_menu
-
-      s << content_tag('tr',
-             content_tag('td', check_box_tag("ids[]", other_issue.id, false, :id => nil), :class => 'checkbox') +
-             content_tag('td', relation.to_s(@issue) {|other| link_to_issue(other, :project => Setting.cross_project_issue_relations?)}.html_safe, :class => 'subject', :style => 'width: 50%') +
+      s <<
+        content_tag(
+          'tr',
+          content_tag('td',
+                      check_box_tag(
+                        "ids[]", other_issue.id,
+                        false, :id => nil),
+                      :class => 'checkbox') +
+             content_tag('td',
+                         relation.to_s(@issue) {|other|
+                           link_to_issue(
+                             other,
+                             :project => Setting.cross_project_issue_relations?)
+                         }.html_safe,
+                         :class => 'subject',
+                         :style => 'width: 50%') +
              content_tag('td', other_issue.status, :class => 'status') +
              content_tag('td', format_date(other_issue.start_date), :class => 'start_date') +
              content_tag('td', format_date(other_issue.due_date), :class => 'due_date') +
              content_tag('td', link_to_user(other_issue.assigned_to), :class => 'assigned_to') +
-             content_tag('td', other_issue.disabled_core_fields.include?('done_ratio') ? '' : progress_bar(other_issue.done_ratio), :class=> 'done_ratio') +
+             content_tag('td',
+                         (if other_issue.disabled_core_fields.include?('done_ratio')
+                            ''
+                          else
+                            progress_bar(other_issue.done_ratio)
+                          end),
+                         :class=> 'done_ratio') +
              content_tag('td', buttons, :class => 'buttons'),
-             :id => "relation-#{relation.id}",
-             :class => css)
+          :id => "relation-#{relation.id}",
+          :class => css)
     end
-
     content_tag('table', s, :class => 'list issues odd-even')
   end