mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
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
This commit is contained in:
parent
9c2d1533b7
commit
7867b4dcd5
@ -146,14 +146,14 @@ module IssuesHelper
|
|||||||
# Renders the list of related issues on the issue details view
|
# Renders the list of related issues on the issue details view
|
||||||
def render_issue_relations(issue, relations)
|
def render_issue_relations(issue, relations)
|
||||||
manage_relations = User.current.allowed_to?(:manage_issue_relations, issue.project)
|
manage_relations = User.current.allowed_to?(:manage_issue_relations, issue.project)
|
||||||
|
|
||||||
s = ''.html_safe
|
s = ''.html_safe
|
||||||
relations.each do |relation|
|
relations.each do |relation|
|
||||||
other_issue = relation.other_issue(issue)
|
other_issue = relation.other_issue(issue)
|
||||||
css = "issue hascontextmenu #{other_issue.css_classes}"
|
css = "issue hascontextmenu #{other_issue.css_classes}"
|
||||||
buttons =
|
buttons =
|
||||||
if manage_relations
|
if manage_relations
|
||||||
link_to(l(:label_relation_delete),
|
link_to(
|
||||||
|
l(:label_relation_delete),
|
||||||
relation_path(relation),
|
relation_path(relation),
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
@ -165,20 +165,37 @@ module IssuesHelper
|
|||||||
"".html_safe
|
"".html_safe
|
||||||
end
|
end
|
||||||
buttons << link_to_context_menu
|
buttons << link_to_context_menu
|
||||||
|
s <<
|
||||||
s << content_tag('tr',
|
content_tag(
|
||||||
content_tag('td', check_box_tag("ids[]", other_issue.id, false, :id => nil), :class => 'checkbox') +
|
'tr',
|
||||||
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',
|
||||||
|
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', other_issue.status, :class => 'status') +
|
||||||
content_tag('td', format_date(other_issue.start_date), :class => 'start_date') +
|
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', 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', 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'),
|
content_tag('td', buttons, :class => 'buttons'),
|
||||||
:id => "relation-#{relation.id}",
|
:id => "relation-#{relation.id}",
|
||||||
:class => css)
|
:class => css)
|
||||||
end
|
end
|
||||||
|
|
||||||
content_tag('table', s, :class => 'list issues odd-even')
|
content_tag('table', s, :class => 'list issues odd-even')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user