Project

General

Profile

Patch #10916 » app_views_issues_relations.rhtml_2012-05-14.diff

Jérôme BATAILLE, 2012-05-14 18:23

View differences:

app/views/issues/_relations.rhtml (copie de travail)
9 9
<% if @relations.present? %>
10 10
<form>
11 11
<table class="list issues">
12
<% @relations.each do |relation| %>
12
<%
13
    _cross_project_issue_relations = Setting.cross_project_issue_relations?
14
    @relations.each do |relation|
15
      issue_related = relation.other_issue(@issue)
16
-%>
13 17
<tr class="issue hascontextmenu">
14
<td class="checkbox"><%= check_box_tag("ids[]", relation.other_issue(@issue).id, false, :id => nil) %></td>
18
<td class="checkbox"><%= check_box_tag("ids[]", issue_related.id, false, :id => nil) %></td>
15 19
<td class="subject"><%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %>
16
    <%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %>
17
    <%= link_to_issue(relation.other_issue(@issue), :truncate => 60) %>
20
    <%= h(issue_related.project) + ' - ' if _cross_project_issue_relations %>
21
    <%= link_to_issue(issue_related, :truncate => 60) %>
18 22
</td>
19
<td class="status"><%= relation.other_issue(@issue).status.name %></td>
20
<td class="start_date"><%= format_date(relation.other_issue(@issue).start_date) %></td>
21
<td class="due_date"><%= format_date(relation.other_issue(@issue).due_date) %></td>
22
<td class="buttons"><%= link_to_remote(image_tag('link_break.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :issue_id => @issue, :id => relation},                                              
23
<td class="status"><%= issue_related.status.name %></td>
24
<td class="start_date"><%= format_date(issue_related.start_date) %></td>
25
<td class="due_date"><%= format_date(issue_related.due_date) %></td>
26
<td class="buttons"><%= link_to_remote(image_tag('link_break.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :issue_id => @issue, :id => relation},
23 27
                                                  :method => :post
24 28
                                                }, :title => l(:label_relation_delete)) if authorize_for('issue_relations', 'destroy') %></td>
25 29
</tr>
26
<% end %>
30
<% end -%>
27 31
</table>
28 32
</form>
29 33
<% end %>
    (1-1/1)