summaryrefslogtreecommitdiffstats
path: root/app/views/versions/_sidebar.html.erb
blob: 0eb517c2413997dc70ff643c74ef8d070ebcb446 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<%= form_tag({}, :method => :get) do %>
<h3><%= l(:label_roadmap) %></h3>
<ul>
<% @trackers.each do |tracker| %>
  <li>
    <%= hidden_field_tag "tracker_ids[]", nil, :id => nil %>
    <label>
      <%= check_box_tag("tracker_ids[]", tracker.id,
                        (@selected_tracker_ids.include? tracker.id.to_s),
                        :id => nil) %>
      <%= tracker.name %>
    </label>
  </li>
<% end %>
</ul>
<p></p>
<ul>
  <li>
    <label for="completed">
      <%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %>
    </label>
  </li>
  <% if @project.descendants.active.any? %>
  <li>
    <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
    <label>
      <%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%>
    </label>
  </li>
  <% end %>
</ul>
<p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
<% end %>

<h3><%= l(:label_version_plural) %></h3>
<ul>
<% @versions.each do |version| %>
  <li>
    <%= link_to(format_version_name(version), "##{version_anchor(version)}") %>
  </li>
<% end %>
</ul>
<% if @completed_versions.present? %>
<p>
  <%= link_to_function l(:label_completed_versions),
                       '$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expanded"); $("#completed-versions").toggle()',
                       :id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %>
  <ul id = "completed-versions" style = "display:none;">
    <% @completed_versions.each do |version| %>
      <li><%= link_to_version version %></li>
    <% end %>
  </ul>
</p>
<% end %>