diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 3aac97943..54cd9d7c2 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -39,7 +39,10 @@ class VersionsController < ApplicationController @versions = @project.shared_versions || [] @versions += @project.rolled_up_versions.visible if @with_subprojects @versions = @versions.uniq.sort - @versions.reject! {|version| version.closed? || version.completed? } unless params[:completed] + unless params[:completed] + @completed_versions = @versions.select {|version| version.closed? || version.completed? } + @versions -= @completed_versions + end @issues_by_version = {} unless @selected_tracker_ids.empty? diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index 6fdf8ae75..09328deb6 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -51,6 +51,16 @@ <% @versions.each do |version| %> <%= link_to format_version_name(version), :anchor => anchor(version.name) %>
<% end %> +<% if @completed_versions.present? %> +

+ <%= link_to_function l(:label_completed_versions), + 'Element.toggleClassName("toggle-completed-versions", "collapsed"); Element.toggle("completed-versions")', + :id => 'toggle-completed-versions', :class => 'collapsible collapsed' %>
+ +

+<% end %> <% end %> <% html_title(l(:label_roadmap)) %> diff --git a/config/locales/ar.yml b/config/locales/ar.yml index da1279c74..96f6aa678 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1015,3 +1015,4 @@ ar: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 90574c722..b146130f3 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1013,3 +1013,4 @@ bg: description_date_to: Въведете крайна дата label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 75b86d02f..6a0ae6d41 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1029,3 +1029,4 @@ bs: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 0d02ac50b..0899a8547 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1017,3 +1017,4 @@ ca: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/cs.yml b/config/locales/cs.yml index e17059019..b41d832fd 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1018,3 +1018,4 @@ cs: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/da.yml b/config/locales/da.yml index 31a57fe23..603f681eb 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1032,3 +1032,4 @@ da: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/de.yml b/config/locales/de.yml index 5363da247..5d6f15e28 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1035,3 +1035,4 @@ de: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/el.yml b/config/locales/el.yml index 9be89e36a..42f0b00d1 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1015,3 +1015,4 @@ el: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 4edf7d35a..66a6e0bed 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1017,3 +1017,4 @@ en-GB: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position} of %{count}" + label_completed_versions: Completed versions diff --git a/config/locales/en.yml b/config/locales/en.yml index e3420d817..6ac30adec 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -838,6 +838,7 @@ en: label_export_options: "%{export_format} export options" label_copy_attachments: Copy attachments label_item_position: %{position} of %{count} + label_completed_versions: Completed versions button_login: Login button_submit: Submit diff --git a/config/locales/es.yml b/config/locales/es.yml index 7065bcde7..02d774376 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1052,3 +1052,4 @@ es: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 66d5c358a..46a892d44 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1018,3 +1018,4 @@ eu: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/fa.yml b/config/locales/fa.yml index e864afc80..e94a6a474 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1017,3 +1017,4 @@ fa: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/fi.yml b/config/locales/fi.yml index f8e478e57..7bc63e2a8 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1036,3 +1036,4 @@ fi: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 72fab71d3..562a488a7 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -814,6 +814,7 @@ fr: label_export_options: Options d'exportation %{export_format} label_copy_attachments: Copier les fichiers label_item_position: %{position} sur %{count} + label_completed_versions: Versions passées button_login: Connexion button_submit: Soumettre diff --git a/config/locales/gl.yml b/config/locales/gl.yml index b39af925d..e57b295a5 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1026,3 +1026,4 @@ gl: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/he.yml b/config/locales/he.yml index 437778838..5d107ceaf 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1020,3 +1020,4 @@ he: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 53afca595..daf43c578 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1021,3 +1021,4 @@ hr: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 1cec05e95..5dfc363c8 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1034,3 +1034,4 @@ field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/id.yml b/config/locales/id.yml index ea11cc051..c82f84cf1 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1021,3 +1021,4 @@ id: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/it.yml b/config/locales/it.yml index 9a6ab3655..05a63486e 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1016,3 +1016,4 @@ it: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 8e3e56fe0..1b4cdcabb 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1045,3 +1045,4 @@ ja: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 065261820..152eaec49 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1067,3 +1067,4 @@ ko: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 3bd8fe469..801de5f87 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1075,3 +1075,4 @@ lt: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 7eeb04b85..bd0b7890a 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1009,3 +1009,4 @@ lv: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/mk.yml b/config/locales/mk.yml index edd02be92..ecb7f5c8e 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1015,3 +1015,4 @@ mk: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 90a70eedd..f75b87b3f 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1015,3 +1015,4 @@ mn: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 4593961cc..163165be8 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -997,3 +997,4 @@ nl: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/no.yml b/config/locales/no.yml index bc0d22642..5abc1165a 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1005,3 +1005,4 @@ field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 909ab16c4..b8c96d93b 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1032,3 +1032,4 @@ pl: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 552d68fdf..1bd4d64a4 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1038,3 +1038,4 @@ pt-BR: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 9311bab1f..0739f1fa2 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1020,3 +1020,4 @@ pt: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 65d3217dd..9cb30bc1b 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1007,3 +1007,4 @@ ro: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 6c39ca224..2f4b31148 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1128,3 +1128,4 @@ ru: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/sk.yml b/config/locales/sk.yml index a54fc0661..804361674 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1010,3 +1010,4 @@ sk: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 9c0d5d03d..415215be4 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1015,3 +1015,4 @@ sl: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index 346ad05a6..bf6234e10 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1015,3 +1015,4 @@ sr-YU: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 77f761efc..4ee720671 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1016,3 +1016,4 @@ sr: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 258253551..43769d4c6 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1056,3 +1056,4 @@ sv: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/th.yml b/config/locales/th.yml index 2a21dcf07..aa03ca468 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1012,3 +1012,4 @@ th: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/tr.yml b/config/locales/tr.yml index e457d76ce..6875f8f34 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1034,3 +1034,4 @@ tr: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/uk.yml b/config/locales/uk.yml index ece6d603d..6bb9b7586 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1012,3 +1012,4 @@ uk: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 8efaec5ca..e81360e97 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1066,3 +1066,4 @@ vi: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 79bd5941e..5c25dee9e 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1095,3 +1095,4 @@ field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/config/locales/zh.yml b/config/locales/zh.yml index d52511fe9..c752edc71 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1017,3 +1017,4 @@ zh: field_repository_is_default: Main repository label_copy_attachments: Copy attachments label_item_position: "%{position}/%{count}" + label_completed_versions: Completed versions diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index b3eb3dc51..dbf359527 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -114,6 +114,10 @@ a.issue.closed, a.issue.closed:link, a.issue.closed:visited { color: #999; text- #admin-menu a {line-height:1.7em;} #admin-menu a.selected {padding-left: 20px !important; background-position: 2px 40%;} +a.collapsible {padding-left: 12px; background: url(../images/arrow_expanded.png) no-repeat -3px 40%;} +a.collapsible.collapsed {background: url(../images/arrow_collapsed.png) no-repeat -5px 40%;} + +a#toggle-completed-versions {color:#999;} /***** Tables *****/ table.list { border: 1px solid #e4e4e4; border-collapse: collapse; width: 100%; margin-bottom: 4px; } table.list th { background-color:#EEEEEE; padding: 4px; white-space:nowrap; } diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb index df1d9a8af..414e2fc72 100644 --- a/test/functional/versions_controller_test.rb +++ b/test/functional/versions_controller_test.rb @@ -42,6 +42,9 @@ class VersionsControllerTest < ActionController::TestCase assert !assigns(:versions).include?(Version.find(1)) # Context menu on issues assert_select "script", :text => Regexp.new(Regexp.escape("new ContextMenu('/issues/context_menu')")) + # Links to completed versions in the sidebar + assert_tag 'a', :attributes => {:href => '/versions/1'}, + :ancestor => {:tag => 'div', :attributes => {:id => 'sidebar'}} end def test_index_with_completed_versions