diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-11-09 16:04:54 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-11-09 16:04:54 +0000 |
commit | 7867b4dcd5d6621cf079fc819d49b797a8be3e08 (patch) | |
tree | 5bc76c61ea5596dc8c259f5f6bde1a41731cf11e /app/helpers/issues_helper.rb | |
parent | 9c2d1533b7cd213060946d65c7725a8439eaf7a2 (diff) | |
download | redmine-7867b4dcd5d6621cf079fc819d49b797a8be3e08.tar.gz redmine-7867b4dcd5d6621cf079fc819d49b797a8be3e08.zip |
cleanup: rubocop: fix Layout/AlignArguments in IssuesHelper#render_issue_relations
git-svn-id: http://svn.redmine.org/redmine/trunk@19027 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r-- | app/helpers/issues_helper.rb | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index be20c59d4..2ea81d566 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -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 |