To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 5e / 5e5c7a06369997d780ba724ee2cb92a1682a8e99.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (2.04 KB)
| 1 | 1296:038ba2d95de8 | Chris | <div class="contextual"> |
|---|---|---|---|
| 2 | <% if User.current.allowed_to?(:manage_issue_relations, @project) %> |
||
| 3 | <%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'relation_issue_to_id'} %>
|
||
| 4 | <% end %> |
||
| 5 | </div> |
||
| 6 | |||
| 7 | <p><strong><%=l(:label_related_issues)%></strong></p> |
||
| 8 | |||
| 9 | <% if @relations.present? %> |
||
| 10 | <form> |
||
| 11 | <table class="list issues"> |
||
| 12 | <% @relations.each do |relation| %> |
||
| 13 | <tr class="issue hascontextmenu" id="relation-<%= relation.id %>"> |
||
| 14 | <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 | <%= 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 | <td class="status"><%=h 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 image_tag('link_break.png'),
|
||
| 23 | {:controller => 'issue_relations', :action => 'destroy', :id => relation},
|
||
| 24 | :remote => true, |
||
| 25 | :method => :delete, |
||
| 26 | :data => {:confirm => l(:text_are_you_sure)},
|
||
| 27 | :title => l(:label_relation_delete) if User.current.allowed_to?(:manage_issue_relations, @project) %></td> |
||
| 28 | </tr> |
||
| 29 | <% end %> |
||
| 30 | </table> |
||
| 31 | </form> |
||
| 32 | <% end %> |
||
| 33 | |||
| 34 | <%= form_for @relation, {
|
||
| 35 | :as => :relation, :remote => true, |
||
| 36 | :url => {:controller => 'issue_relations', :action => 'create', :issue_id => @issue},
|
||
| 37 | :method => :post, |
||
| 38 | :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}
|
||
| 39 | } do |f| %> |
||
| 40 | <%= render :partial => 'issue_relations/form', :locals => {:f => f}%>
|
||
| 41 | <% end %> |