<%= l(:label_issue_hierarchy) %> (<%= 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 %>
<% @ancestors.each do |issue| %> <%= render_issue_tree_row issue, indent, "parent" %> <% indent += 1 %> <% end %> <%= render_issue_tree_row @issue, indent, "root" %> <% indent += 1 %> <% issue_list(@descendants) do |issue, level| %> <%= render_issue_tree_row issue, indent + level, "child" %> <% end %>
<% end %>