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) %>
+
+<% @trackers.each do |tracker| %>
+
+
+ <%= check_box_tag("tracker_ids[]", tracker.id,
+ (@selected_tracker_ids.include? tracker.id.to_s),
+ :id => nil) %>
+ <%= tracker.name %>
+
+
+<% end %>
+
+
+
+
+
+ <%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %>
+
+
+ <% if @project.descendants.active.any? %>
+
+ <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
+
+ <%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%>
+
+
+ <% end %>
+
+<%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %>
+<% end %>
+
+<%= l(:label_version_plural) %>
+
+<% @versions.each do |version| %>
+
+ <%= link_to(format_version_name(version), "##{version_anchor(version)}") %>
+
+<% end %>
+
+<% 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' %>
+
+ <% @completed_versions.each do |version| %>
+ <%= link_to_version version %>
+ <% end %>
+
+
+<% 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) %>
-
-<% @trackers.each do |tracker| %>
-
-
- <%= check_box_tag("tracker_ids[]", tracker.id,
- (@selected_tracker_ids.include? tracker.id.to_s),
- :id => nil) %>
- <%= tracker.name %>
-
-
-<% end %>
-
-
-
-
-
- <%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %>
-
-
- <% if @project.descendants.active.any? %>
-
- <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
-
- <%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%>
-
-
- <% end %>
-
-<%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %>
-<% end %>
-
-<%= l(:label_version_plural) %>
-
-<% @versions.each do |version| %>
-
- <%= link_to(format_version_name(version), "##{version_anchor(version)}") %>
-
-<% end %>
-
-<% 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' %>
-
- <% @completed_versions.each do |version| %>
- <%= link_to_version version %>
- <% end %>
-
-
-<% end %>
+ <%= render :partial => 'versions/sidebar' %>
<% end %>
<% html_title(l(:label_roadmap)) %>
--
2.39.5