To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / issues / _relations.html.erb @ 912:5e80956cc792
History | View | Annotate | Download (1.95 KB)
| 1 | 0:513646585e45 | Chris | <div class="contextual"> |
|---|---|---|---|
| 2 | 441:cbce1fd3b1b7 | Chris | <% if User.current.allowed_to?(:manage_issue_relations, @project) %>
|
| 3 | 14:1d32c0a0efbf | Chris | <%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'relation_issue_to_id'} %>
|
| 4 | 0:513646585e45 | Chris | <% end %>
|
| 5 | </div>
|
||
| 6 | |||
| 7 | <p><strong><%=l(:label_related_issues)%></strong></p> |
||
| 8 | |||
| 9 | 210:0579821a129a | Chris | <% if @relations.present? %>
|
| 10 | 441:cbce1fd3b1b7 | Chris | <form>
|
| 11 | <table class="list issues"> |
||
| 12 | 210:0579821a129a | Chris | <% @relations.each do |relation| %>
|
| 13 | 909:cbb26bc654de | Chris | <tr class="issue hascontextmenu" id="relation-<%= relation.id %>"> |
| 14 | 441:cbce1fd3b1b7 | Chris | <td class="checkbox"><%= check_box_tag("ids[]", relation.other_issue(@issue).id, false, :id => nil) %></td> |
| 15 | <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 | 0:513646585e45 | Chris | <%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %>
|
| 17 | <%= link_to_issue(relation.other_issue(@issue), :truncate => 60) %>
|
||
| 18 | </td>
|
||
| 19 | 909:cbb26bc654de | Chris | <td class="status"><%=h relation.other_issue(@issue).status.name %></td> |
| 20 | 441:cbce1fd3b1b7 | Chris | <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 | 909:cbb26bc654de | Chris | <td class="buttons"><%= link_to_remote(image_tag('link_break.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :id => relation}, |
| 23 | :method => :delete
|
||
| 24 | 0:513646585e45 | Chris | }, :title => l(:label_relation_delete)) if authorize_for('issue_relations', 'destroy') %></td> |
| 25 | </tr>
|
||
| 26 | <% end %>
|
||
| 27 | </table>
|
||
| 28 | 441:cbce1fd3b1b7 | Chris | </form>
|
| 29 | 0:513646585e45 | Chris | <% end %>
|
| 30 | |||
| 31 | 909:cbb26bc654de | Chris | <% remote_form_for(:relation, @relation,
|
| 32 | :url => {:controller => 'issue_relations', :action => 'create', :issue_id => @issue},
|
||
| 33 | 0:513646585e45 | Chris | :method => :post,
|
| 34 | 22:40f7cfd4df19 | chris | :complete => "Form.Element.focus('relation_issue_to_id');",
|
| 35 | 0:513646585e45 | Chris | :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}) do |f| %>
|
| 36 | <%= render :partial => 'issue_relations/form', :locals => {:f => f}%>
|
||
| 37 | <% end %> |