]> source.dussan.org Git - redmine.git/commitdiff
Move subtasks section on issues show view into a separate partial (#35671).
authorGo MAEDA <maeda@farend.jp>
Tue, 17 Aug 2021 09:42:54 +0000 (09:42 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 17 Aug 2021 09:42:54 +0000 (09:42 +0000)
Patch by Mischa The Evil.

git-svn-id: http://svn.redmine.org/redmine/trunk@21190 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/issues/_subtasks.html.erb [new file with mode: 0644]
app/views/issues/show.html.erb

diff --git a/app/views/issues/_subtasks.html.erb b/app/views/issues/_subtasks.html.erb
new file mode 100644 (file)
index 0000000..c84b5ba
--- /dev/null
@@ -0,0 +1,12 @@
+<div class="contextual">
+  <%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
+</div>
+
+<p>
+  <strong><%=l(:label_subtask_plural)%></strong>
+  <%= render_descendants_stats(@issue) unless @issue.leaf? %>
+</p>
+
+<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %>
+  <%= render_descendants_tree(@issue) unless @issue.leaf? %>
+<% end %>
index 6b84bdfb3d8f237a15327624e01d4b6b0306fc4c..390728adad31bcb9955216b79cf32564007a88ac 100644 (file)
@@ -105,16 +105,7 @@ end %>
 <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
 <hr />
 <div id="issue_tree">
-<div class="contextual">
-  <%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
-</div>
-<p>
-  <strong><%=l(:label_subtask_plural)%></strong>
-  <%= render_descendants_stats(@issue) unless @issue.leaf? %>
-</p>
-<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %>
-<%= render_descendants_tree(@issue) unless @issue.leaf? %>
-<% end %>
+<%= render :partial => 'subtasks' %>
 </div>
 <% end %>