<%= 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) %>) <% indent = 0 %>
<% @issue.ancestors.each do |issue| %> <%= render :partial => 'subissue_row', :locals => { :issue => issue, :level => indent, :relation => "parent" } %> <% indent += 1 %> <% end %> <%= render :partial => 'subissue_row', :locals => { :issue => @issue, :level => indent, :relation => "root" } %> <% indent += 1 %> <% issue_list(@issue.descendants.sort_by(&:lft)) do |issue, level| %> <%= render :partial => 'subissue_row', :locals => { :issue => issue, :level => indent, :relation => "child" } %> <% end %>