summaryrefslogtreecommitdiffstats
path: root/app/views/issues/_relations.html.erb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-19 10:03:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-19 10:03:27 +0000
commit17233e868110d153cfcf5e8947fad6715ccfada2 (patch)
tree091109259bfb1170adb41f0d4572ac9a95ee634f /app/views/issues/_relations.html.erb
parentaff93d77748992216234945f55dc19a2828c23e1 (diff)
downloadredmine-17233e868110d153cfcf5e8947fad6715ccfada2.tar.gz
redmine-17233e868110d153cfcf5e8947fad6715ccfada2.zip
Extracts the rendering of related issues to an helper (#3425).
git-svn-id: http://svn.redmine.org/redmine/trunk@15981 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/issues/_relations.html.erb')
-rw-r--r--app/views/issues/_relations.html.erb23
1 files changed, 1 insertions, 22 deletions
diff --git a/app/views/issues/_relations.html.erb b/app/views/issues/_relations.html.erb
index cab1d0c1a..3825fe64f 100644
--- a/app/views/issues/_relations.html.erb
+++ b/app/views/issues/_relations.html.erb
@@ -8,28 +8,7 @@
<% if @relations.present? %>
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %>
-<table class="list issues">
-<% @relations.each do |relation| %>
- <% other_issue = relation.other_issue(@issue) -%>
- <tr class="issue hascontextmenu <%= other_issue.css_classes %>" id="relation-<%= relation.id %>">
- <td class="checkbox"><%= check_box_tag("ids[]", other_issue.id, false, :id => nil) %></td>
- <td class="subject" style="width: 50%">
- <%= relation.to_s(@issue) {|other| link_to_issue(other, :project => Setting.cross_project_issue_relations?)}.html_safe %>
- </td>
- <td class="status"><%= other_issue.status.name %></td>
- <td class="start_date"><%= format_date(other_issue.start_date) %></td>
- <td class="due_date"><%= format_date(other_issue.due_date) %></td>
- <td class="buttons"><%= 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'
- ) if User.current.allowed_to?(:manage_issue_relations, @project) %></td>
- </tr>
-<% end %>
-</table>
+ <%= render_issue_relations(@issue, @relations) %>
<% end %>
<% end %>