@@ -1,38 +1,39 | |||
|
1 | 1 | <% manage_allowed = User.current.allowed_to?(:manage_related_issues, @repository.project) %> |
|
2 | 2 | |
|
3 | 3 | <div id="related-issues"> |
|
4 | 4 | <% if manage_allowed %> |
|
5 | 5 | <div class="contextual"> |
|
6 | 6 | <%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'issue_id'} %> |
|
7 | 7 | </div> |
|
8 | 8 | <% end %> |
|
9 | 9 | |
|
10 | 10 | <h3><%= l(:label_related_issues) %></h3> |
|
11 | 11 | <ul> |
|
12 | 12 | <% @changeset.issues.visible.each do |issue| %> |
|
13 | 13 | <li id="<%= "related-issue-#{issue.id}" %>"><%= link_to_issue issue %> |
|
14 | 14 | <%= link_to_remote(image_tag('link_break.png'), |
|
15 | 15 | {:url => {:controller => 'repositories', :action => 'remove_related_issue', |
|
16 | 16 | :id => @project, :repository_id => @repository.identifier_param, |
|
17 | 17 | :rev => @changeset.identifier, :issue_id => issue}, |
|
18 | 18 | :method => :delete, |
|
19 | :confirm => l(:text_are_you_sure), | |
|
19 | 20 | }, :title => l(:label_relation_delete)) if manage_allowed %> |
|
20 | 21 | |
|
21 | 22 | </li> |
|
22 | 23 | <% end %> |
|
23 | 24 | </ul> |
|
24 | 25 | |
|
25 | 26 | <% if manage_allowed %> |
|
26 | 27 | <% remote_form_for(:issue, @issue, |
|
27 | 28 | :url => {:controller => 'repositories', :action => 'add_related_issue', |
|
28 | 29 | :id => @project, :repository_id => @repository.identifier_param, |
|
29 | 30 | :rev => @changeset.identifier}, |
|
30 | 31 | :method => :post, |
|
31 | 32 | :complete => "Form.Element.focus('issue_id');", |
|
32 | 33 | :html => {:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')}) do |f| %> |
|
33 | 34 | <%= l(:label_issue) %> #<%= text_field_tag 'issue_id', '', :size => 10 %> |
|
34 | 35 | <%= submit_tag l(:button_add) %> |
|
35 | 36 | <%= toggle_link l(:button_cancel), 'new-relation-form'%> |
|
36 | 37 | <% end %> |
|
37 | 38 | <% end %> |
|
38 | 39 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now