From a0fa4491c0aeb47723d20e614ccb75eb0d713596 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 19 Aug 2021 09:49:49 +0000 Subject: [PATCH] Move sidebar content on versions index view (roadmap) into a separate partial (#35773). Patch by Mischa The Evil. git-svn-id: http://svn.redmine.org/redmine/trunk@21195 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/versions/_sidebar.html.erb | 53 +++++++++++++++++++++++++++ app/views/versions/index.html.erb | 54 +--------------------------- 2 files changed, 54 insertions(+), 53 deletions(-) create mode 100644 app/views/versions/_sidebar.html.erb diff --git a/app/views/versions/_sidebar.html.erb b/app/views/versions/_sidebar.html.erb new file mode 100644 index 000000000..abfe9c67c --- /dev/null +++ b/app/views/versions/_sidebar.html.erb @@ -0,0 +1,53 @@ +<%= form_tag({}, :method => :get) do %> +

<%= l(:label_roadmap) %>

+ +

+ +

<%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %>

+<% end %> + +

<%= l(:label_version_plural) %>

+ +<% if @completed_versions.present? %> +

+ <%= link_to_function l(:label_completed_versions), + '$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expended"); $("#completed-versions").toggle()', + :id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %> +

+

+<% end %> \ No newline at end of file diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index 61fbe05ab..382133e93 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -50,59 +50,7 @@ <% end %> <% content_for :sidebar do %> -<%= form_tag({}, :method => :get) do %> -

<%= l(:label_roadmap) %>

- -

- -

<%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %>

-<% end %> - -

<%= l(:label_version_plural) %>

- -<% if @completed_versions.present? %> -

- <%= link_to_function l(:label_completed_versions), - '$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expended"); $("#completed-versions").toggle()', - :id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %> -

-

-<% end %> + <%= render :partial => 'versions/sidebar' %> <% end %> <% html_title(l(:label_roadmap)) %> -- 2.39.5