0001-Move-sidebar-content-on-versions-index-view-roadmap-.patch

Patch against trunk@r21131 - Mischa The Evil, 2021-08-17 11:51

Download (4.35 KB)

View differences:

app/views/versions/_sidebar.html.erb
1
<%= form_tag({}, :method => :get) do %>
2
<h3><%= l(:label_roadmap) %></h3>
3
<ul>
4
<% @trackers.each do |tracker| %>
5
  <li>
6
    <label>
7
      <%= check_box_tag("tracker_ids[]", tracker.id,
8
                        (@selected_tracker_ids.include? tracker.id.to_s),
9
                        :id => nil) %>
10
      <%= tracker.name %>
11
    </label>
12
  </li>
13
<% end %>
14
</ul>
15
<p></p>
16
<ul>
17
  <li>
18
    <label for="completed">
19
      <%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %>
20
    </label>
21
  </li>
22
  <% if @project.descendants.active.any? %>
23
  <li>
24
    <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
25
    <label>
26
      <%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%>
27
    </label>
28
  </li>
29
  <% end %>
30
</ul>
31
<p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
32
<% end %>
33

  
34
<h3><%= l(:label_version_plural) %></h3>
35
<ul>
36
<% @versions.each do |version| %>
37
  <li>
38
    <%= link_to(format_version_name(version), "##{version_anchor(version)}") %>
39
  </li>
40
<% end %>
41
</ul>
42
<% if @completed_versions.present? %>
43
<p>
44
  <%= link_to_function l(:label_completed_versions),
45
                       '$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expended"); $("#completed-versions").toggle()',
46
                       :id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %>
47
  <ul id = "completed-versions" style = "display:none;">
48
    <% @completed_versions.each do |version| %>
49
      <li><%= link_to_version version %></li>
50
    <% end %>
51
  </ul>
52
</p>
53
<% end %>
app/views/versions/index.html.erb
50 50
<% end %>
51 51

  
52 52
<% content_for :sidebar do %>
53
<%= form_tag({}, :method => :get) do %>
54
<h3><%= l(:label_roadmap) %></h3>
55
<ul>
56
<% @trackers.each do |tracker| %>
57
  <li>
58
    <label>
59
      <%= check_box_tag("tracker_ids[]", tracker.id,
60
                        (@selected_tracker_ids.include? tracker.id.to_s),
61
                        :id => nil) %>
62
      <%= tracker.name %>
63
    </label>
64
  </li>
65
<% end %>
66
</ul>
67
<p></p>
68
<ul>
69
  <li>
70
    <label for="completed">
71
      <%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %>
72
    </label>
73
  </li>
74
  <% if @project.descendants.active.any? %>
75
  <li>
76
    <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
77
    <label>
78
      <%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%>
79
    </label>
80
  </li>
81
  <% end %>
82
</ul>
83
<p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
84
<% end %>
85

  
86
<h3><%= l(:label_version_plural) %></h3>
87
<ul>
88
<% @versions.each do |version| %>
89
  <li>
90
    <%= link_to(format_version_name(version), "##{version_anchor(version)}") %>
91
  </li>
92
<% end %>
93
</ul>
94
<% if @completed_versions.present? %>
95
<p>
96
  <%= link_to_function l(:label_completed_versions),
97
                       '$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expended"); $("#completed-versions").toggle()',
98
                       :id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %>
99
  <ul id = "completed-versions" style = "display:none;">
100
    <% @completed_versions.each do |version| %>
101
      <li><%= link_to_version version %></li>
102
    <% end %>
103
  </ul>
104
</p>
105
<% end %>
53
  <%= render :partial => 'versions/sidebar' %>
106 54
<% end %>
107 55

  
108 56
<% html_title(l(:label_roadmap)) %>
109
-