diff options
author | Go MAEDA <maeda@farend.jp> | 2021-08-17 09:42:54 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-08-17 09:42:54 +0000 |
commit | 001252d966508dac4d9bf29a8a4487d811c00b8f (patch) | |
tree | 7782858c54f0d687971ea54530320776baf38129 | |
parent | f49e1474050e6944f1cd9050fd91edbd1caa6002 (diff) | |
download | redmine-001252d966508dac4d9bf29a8a4487d811c00b8f.tar.gz redmine-001252d966508dac4d9bf29a8a4487d811c00b8f.zip |
Move subtasks section on issues show view into a separate partial (#35671).
Patch by Mischa The Evil.
git-svn-id: http://svn.redmine.org/redmine/trunk@21190 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/issues/_subtasks.html.erb | 12 | ||||
-rw-r--r-- | app/views/issues/show.html.erb | 11 |
2 files changed, 13 insertions, 10 deletions
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 @@ +<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 %> 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) %> <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 %> |