Commit e2091f7b authored by jplang's avatar jplang

Provide a direct access to completed versions form the roadmap.

git-svn-id: https://svn.redmine.org/redmine/trunk@8699 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 50b1ebd2
......@@ -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?
......
......@@ -51,6 +51,16 @@
<% @versions.each do |version| %>
<%= link_to format_version_name(version), :anchor => anchor(version.name) %><br />
<% 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 %>
<% html_title(l(:label_roadmap)) %>
......
......@@ -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
......@@ -1013,3 +1013,4 @@ bg:
description_date_to: Въведете крайна дата
label_copy_attachments: Copy attachments
label_item_position: "%{position}/%{count}"
label_completed_versions: Completed versions
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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; }
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment