From e2b4945aac6bbabe771182f5023eae563b0b17d2 Mon Sep 17 00:00:00 2001 From: Mischa The Evil Date: Tue, 3 Aug 2021 01:17:54 +0200 Subject: [PATCH] Move subtasks section of issues show to separate partial. --- app/views/issues/_subtasks.html.erb | 12 ++++++++++++ app/views/issues/show.html.erb | 11 +---------- 2 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 app/views/issues/_subtasks.html.erb diff --git a/app/views/issues/_subtasks.html.erb b/app/views/issues/_subtasks.html.erb new file mode 100644 index 000000000..c84b5baf9 --- /dev/null +++ b/app/views/issues/_subtasks.html.erb @@ -0,0 +1,12 @@ +
+ <%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %> +
+ +

+ <%=l(:label_subtask_plural)%> + <%= render_descendants_stats(@issue) unless @issue.leaf? %> +

+ +<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %> + <%= render_descendants_tree(@issue) unless @issue.leaf? %> +<% end %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 6b84bdfb3..390728ada 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -105,16 +105,7 @@ end %> <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
-
- <%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %> -
-

- <%=l(:label_subtask_plural)%> - <%= render_descendants_stats(@issue) unless @issue.leaf? %> -

-<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %> -<%= render_descendants_tree(@issue) unless @issue.leaf? %> -<% end %> +<%= render :partial => 'subtasks' %>
<% end %> -- 2.26.0.windows.1