Provide a direct access to completed versions form the roadmap.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8699 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-01-24 18:45:40 +00:00
parent 858bd8dc40
commit af0fcd22e4
49 changed files with 66 additions and 1 deletions

View File

@ -39,7 +39,10 @@ class VersionsController < ApplicationController
@versions = @project.shared_versions || [] @versions = @project.shared_versions || []
@versions += @project.rolled_up_versions.visible if @with_subprojects @versions += @project.rolled_up_versions.visible if @with_subprojects
@versions = @versions.uniq.sort @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 = {} @issues_by_version = {}
unless @selected_tracker_ids.empty? unless @selected_tracker_ids.empty?

View File

@ -51,6 +51,16 @@
<% @versions.each do |version| %> <% @versions.each do |version| %>
<%= link_to format_version_name(version), :anchor => anchor(version.name) %><br /> <%= link_to format_version_name(version), :anchor => anchor(version.name) %><br />
<% end %> <% end %>
<% if @completed_versions.present? %>
<p>
<%= link_to_function l(:label_completed_versions),
'Element.toggleClassName("toggle-completed-versions", "collapsed"); Element.toggle("completed-versions")',
:id => 'toggle-completed-versions', :class => 'collapsible collapsed' %><br />
<span id="completed-versions" style="display:none;">
<%= @completed_versions.map {|version| link_to format_version_name(version), version_path(version)}.join("<br />\n".html_safe) %>
</span>
</p>
<% end %>
<% end %> <% end %>
<% html_title(l(:label_roadmap)) %> <% html_title(l(:label_roadmap)) %>

View File

@ -1015,3 +1015,4 @@ ar:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1013,3 +1013,4 @@ bg:
description_date_to: Въведете крайна дата description_date_to: Въведете крайна дата
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1029,3 +1029,4 @@ bs:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1017,3 +1017,4 @@ ca:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1018,3 +1018,4 @@ cs:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1032,3 +1032,4 @@ da:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1035,3 +1035,4 @@ de:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1015,3 +1015,4 @@ el:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1017,3 +1017,4 @@ en-GB:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position} of %{count}" label_item_position: "%{position} of %{count}"
label_completed_versions: Completed versions

View File

@ -838,6 +838,7 @@ en:
label_export_options: "%{export_format} export options" label_export_options: "%{export_format} export options"
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: %{position} of %{count} label_item_position: %{position} of %{count}
label_completed_versions: Completed versions
button_login: Login button_login: Login
button_submit: Submit button_submit: Submit

View File

@ -1052,3 +1052,4 @@ es:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1018,3 +1018,4 @@ eu:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1017,3 +1017,4 @@ fa:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1036,3 +1036,4 @@ fi:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -814,6 +814,7 @@ fr:
label_export_options: Options d'exportation %{export_format} label_export_options: Options d'exportation %{export_format}
label_copy_attachments: Copier les fichiers label_copy_attachments: Copier les fichiers
label_item_position: %{position} sur %{count} label_item_position: %{position} sur %{count}
label_completed_versions: Versions passées
button_login: Connexion button_login: Connexion
button_submit: Soumettre button_submit: Soumettre

View File

@ -1026,3 +1026,4 @@ gl:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1020,3 +1020,4 @@ he:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1021,3 +1021,4 @@ hr:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1034,3 +1034,4 @@
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1021,3 +1021,4 @@ id:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1016,3 +1016,4 @@ it:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1045,3 +1045,4 @@ ja:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1067,3 +1067,4 @@ ko:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1075,3 +1075,4 @@ lt:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1009,3 +1009,4 @@ lv:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1015,3 +1015,4 @@ mk:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1015,3 +1015,4 @@ mn:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -997,3 +997,4 @@ nl:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1005,3 +1005,4 @@
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1032,3 +1032,4 @@ pl:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1038,3 +1038,4 @@ pt-BR:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1020,3 +1020,4 @@ pt:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1007,3 +1007,4 @@ ro:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1128,3 +1128,4 @@ ru:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1010,3 +1010,4 @@ sk:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1015,3 +1015,4 @@ sl:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1015,3 +1015,4 @@ sr-YU:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1016,3 +1016,4 @@ sr:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1056,3 +1056,4 @@ sv:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1012,3 +1012,4 @@ th:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1034,3 +1034,4 @@ tr:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1012,3 +1012,4 @@ uk:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1066,3 +1066,4 @@ vi:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1095,3 +1095,4 @@
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -1017,3 +1017,4 @@ zh:
field_repository_is_default: Main repository field_repository_is_default: Main repository
label_copy_attachments: Copy attachments label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}" label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions

View File

@ -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 {line-height:1.7em;}
#admin-menu a.selected {padding-left: 20px !important; background-position: 2px 40%;} #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 *****/ /***** Tables *****/
table.list { border: 1px solid #e4e4e4; border-collapse: collapse; width: 100%; margin-bottom: 4px; } 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; } table.list th { background-color:#EEEEEE; padding: 4px; white-space:nowrap; }

View File

@ -42,6 +42,9 @@ class VersionsControllerTest < ActionController::TestCase
assert !assigns(:versions).include?(Version.find(1)) assert !assigns(:versions).include?(Version.find(1))
# Context menu on issues # Context menu on issues
assert_select "script", :text => Regexp.new(Regexp.escape("new ContextMenu('/issues/context_menu')")) 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 end
def test_index_with_completed_versions def test_index_with_completed_versions