From 54f9c042a71fbe289b9e797c5d99d32f90d194d9 Mon Sep 17 00:00:00 2001 From: Mischa The Evil Date: Tue, 17 Aug 2021 11:49:32 +0200 Subject: [PATCH] Move sidebar content on versions index view (roadmap) into a separate partial. --- 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.26.0.windows.1