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 @ 1298:4f746d8966dd
History | View | Annotate | Download (1.93 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 | 1295:622f24f53b42 | Chris | <% other_issue = relation.other_issue(@issue) -%>
|
| 14 | <tr class="issue hascontextmenu" id="relation-<%= relation.id %>"> |
||
| 15 | <td class="checkbox"><%= check_box_tag("ids[]", other_issue.id, false, :id => nil) %></td> |
||
| 16 | <td class="subject"> |
||
| 17 | <%= l(relation.label_for(@issue)) %>
|
||
| 18 | <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %>
|
||
| 19 | <%= h(other_issue.project) + ' - ' if Setting.cross_project_issue_relations? %>
|
||
| 20 | <%= link_to_issue(other_issue, :truncate => 60) %>
|
||
| 21 | </td>
|
||
| 22 | <td class="status"><%=h other_issue.status.name %></td> |
||
| 23 | <td class="start_date"><%= format_date(other_issue.start_date) %></td> |
||
| 24 | <td class="due_date"><%= format_date(other_issue.due_date) %></td> |
||
| 25 | <td class="buttons"><%= link_to image_tag('link_break.png'), |
||
| 26 | relation_path(relation),
|
||
| 27 | :remote => true,
|
||
| 28 | :method => :delete,
|
||
| 29 | :data => {:confirm => l(:text_are_you_sure)},
|
||
| 30 | :title => l(:label_relation_delete) if User.current.allowed_to?(:manage_issue_relations, @project) %></td> |
||
| 31 | </tr>
|
||
| 32 | 0:513646585e45 | Chris | <% end %>
|
| 33 | </table>
|
||
| 34 | 441:cbce1fd3b1b7 | Chris | </form>
|
| 35 | 0:513646585e45 | Chris | <% end %>
|
| 36 | |||
| 37 | 1115:433d4f72a19b | Chris | <%= form_for @relation, {
|
| 38 | :as => :relation, :remote => true,
|
||
| 39 | 1295:622f24f53b42 | Chris | :url => issue_relations_path(@issue),
|
| 40 | 0:513646585e45 | Chris | :method => :post,
|
| 41 | 1115:433d4f72a19b | Chris | :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}
|
| 42 | } do |f| %>
|
||
| 43 | 0:513646585e45 | Chris | <%= render :partial => 'issue_relations/form', :locals => {:f => f}%>
|
| 44 | <% end %> |