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 @ 1591:63650ae64bf2
History | View | Annotate | Download (1.92 KB)
| 1 |
<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 |
<% 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 |
<% end %>
|
| 33 |
</table>
|
| 34 |
</form>
|
| 35 |
<% end %>
|
| 36 |
|
| 37 |
<%= form_for @relation, {
|
| 38 |
:as => :relation, :remote => true,
|
| 39 |
:url => issue_relations_path(@issue),
|
| 40 |
:method => :post,
|
| 41 |
:html => {:id => 'new-relation-form', :style => 'display: none;'}
|
| 42 |
} do |f| %>
|
| 43 |
<%= render :partial => 'issue_relations/form', :locals => {:f => f}%>
|
| 44 |
<% end %>
|