summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-24 18:47:38 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-24 18:47:38 +0000
commit1fa341df1cfb4198ce3cd34190fa7de774c0d387 (patch)
tree8678ea8e5e0398e0af7600c3cbbb9f1b56049d97
parentaf0fcd22e40d19930e8c379f963df662f3a9a454 (diff)
downloadredmine-1fa341df1cfb4198ce3cd34190fa7de774c0d387.tar.gz
redmine-1fa341df1cfb4198ce3cd34190fa7de774c0d387.zip
Fixed links to versions anchors on the roadmap.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8700 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/versions/index.html.erb2
-rw-r--r--test/functional/versions_controller_test.rb3
2 files changed, 4 insertions, 1 deletions
diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb
index 09328deb6..5c32da515 100644
--- a/app/views/versions/index.html.erb
+++ b/app/views/versions/index.html.erb
@@ -49,7 +49,7 @@
<h3><%= l(:label_version_plural) %></h3>
<% @versions.each do |version| %>
-<%= link_to format_version_name(version), :anchor => anchor(version.name) %><br />
+<%= link_to format_version_name(version), "##{anchor(version.name)}" %><br />
<% end %>
<% if @completed_versions.present? %>
<p>
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb
index 414e2fc72..9ba301bc5 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 versions anchors
+ assert_tag 'a', :attributes => {:href => '#2.0'},
+ :ancestor => {:tag => 'div', :attributes => {:id => 'sidebar'}}
# Links to completed versions in the sidebar
assert_tag 'a', :attributes => {:href => '/versions/1'},
:ancestor => {:tag => 'div', :attributes => {:id => 'sidebar'}}