Adds REST API for issue relations (#7366).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6176 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
9fca4c440c
commit
21b3718744
10 files changed
+172
-33
No files matched your search
@@ -20,7 +20,7 @@
|
||||
<td class="start_date"><%= format_date(relation.other_issue(@issue).start_date) %></td>
|
||||
<td class="due_date"><%= format_date(relation.other_issue(@issue).due_date) %></td>
|
||||
<td class="buttons"><%= link_to_remote(image_tag('link_break.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :issue_id => @issue, :id => relation},
|
||||
:method => :post
|
||||
:method => :delete
|
||||
}, :title => l(:label_relation_delete)) if authorize_for('issue_relations', 'destroy') %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -29,7 +29,7 @@
|
||||
<% end %>
|
||||
|
||||
<% remote_form_for(:relation, @relation,
|
||||
:url => {:controller => 'issue_relations', :action => 'new', :issue_id => @issue},
|
||||
:url => {:controller => 'issue_relations', :action => 'create', :issue_id => @issue},
|
||||
:method => :post,
|
||||
:complete => "Form.Element.focus('relation_issue_to_id');",
|
||||
:html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}) do |f| %>
|
||||
|
||||
@@ -27,7 +27,7 @@ api.issue do
|
||||
|
||||
api.array :relations do
|
||||
@relations.each do |relation|
|
||||
api.relation(:id => relation.id, :issue_id => relation.other_issue(@issue).id, :relation_type => relation.relation_type_for(@issue), :delay => relation.delay)
|
||||
api.relation(:id => relation.id, :issue_id => relation.issue_from_id, :issue_to_id => relation.issue_to_id, :relation_type => relation.relation_type_for(@issue), :delay => relation.delay)
|
||||
end
|
||||
end if include_in_api_response?('relations') && @relations.present?
|
||||
|
||||
|
||||
Reference in new issue
Block a user