OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/work_packages/_relations.html.erb

38 lines
1.3 KiB

<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 the OpenProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<p>
<strong><%=l(:label_related_work_packages)%></strong>
<% if authorize_for('work_package_relations', 'create') %>
(<%= toggle_link l(:label_add_related_work_packages), 'new-relation-form', {:focus => 'relation_issue_to_id'} %>)
<% end %>
</p>
<table style="width:100%">
<tbody>
<%= render :partial => 'relation', :collection => relations,
:as => :relation,
:locals => { :work_package => work_package } -%>
</tbody>
</table>
<%= form_for(work_package.new_relation,
:as => :relation,
:url => work_package_relations_path(work_package),
:method => :post,
:remote => true,
:complete => "Form.Element.focus('relation_issue_to_id');",
:html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}) do |f| %>
<%= render :partial => 'work_package_relations/form', :locals => {:f => f}%>
<% end %>