@@ -1,33 +1,34 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <% if authorize_for('issue_relations', 'new') %> |
|
3 | 3 | <%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'relation_issue_to_id'} %> |
|
4 | 4 | <% end %> |
|
5 | 5 | </div> |
|
6 | 6 | |
|
7 | 7 | <p><strong><%=l(:label_related_issues)%></strong></p> |
|
8 | 8 | |
|
9 | 9 | <% if @issue.relations.any? %> |
|
10 | 10 | <table style="width:100%"> |
|
11 | 11 | <% @issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation| %> |
|
12 | 12 | <tr> |
|
13 | 13 | <td><%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %> |
|
14 | 14 | <%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %> |
|
15 | 15 | <%= link_to_issue(relation.other_issue(@issue), :truncate => 60) %> |
|
16 | 16 | </td> |
|
17 | 17 | <td><%= relation.other_issue(@issue).status.name %></td> |
|
18 | 18 | <td><%= format_date(relation.other_issue(@issue).start_date) %></td> |
|
19 | 19 | <td><%= format_date(relation.other_issue(@issue).due_date) %></td> |
|
20 | 20 | <td><%= link_to_remote(image_tag('delete.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :issue_id => @issue, :id => relation}, |
|
21 | 21 | :method => :post |
|
22 | 22 | }, :title => l(:label_relation_delete)) if authorize_for('issue_relations', 'destroy') %></td> |
|
23 | 23 | </tr> |
|
24 | 24 | <% end %> |
|
25 | 25 | </table> |
|
26 | 26 | <% end %> |
|
27 | 27 | |
|
28 | 28 | <% remote_form_for(:relation, @relation, |
|
29 | 29 | :url => {:controller => 'issue_relations', :action => 'new', :issue_id => @issue}, |
|
30 | 30 | :method => :post, |
|
31 | :complete => "Form.Element.focus('relation_issue_to_id');", | |
|
31 | 32 | :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}) do |f| %> |
|
32 | 33 | <%= render :partial => 'issue_relations/form', :locals => {:f => f}%> |
|
33 | 34 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now