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/issues/_subissues_paragraph.html.erb

27 lines
891 B

<strong><%= l(:label_issue_hierarchy) %></strong>
(<%= link_to(l(:label_add_subtask), {:controller => 'issues', :action => 'new', :project_id => @project, :issue => {:parent_issue_id => @issue}}) if User.current.allowed_to?(:manage_subtasks, @project) %>)
<% if !@issue.leaf? || @issue.parent %>
<% indent = 0 %>
<form action="#">
<table id="issue_tree" class="list">
<!-- render parent elements -->
<% @ancestors.each do |issue| %>
<%= render_issue_tree_row issue, indent, "parent" %>
<% indent += 1 %>
<% end %>
<!-- render current element -->
<%= render_issue_tree_row @issue, indent, "root" %>
<% indent += 1 %>
<!-- render child elements -->
<% issue_list(@descendants) do |issue, level| %>
<%= render_issue_tree_row issue, indent + level, "child" %>
<% end %>
</table>
</form>
<% end %>