Commit 4e772016 authored by jplang's avatar jplang

Removes spaces in versions anchors.

git-svn-id: https://svn.redmine.org/redmine/trunk@8560 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent fba971bd
......@@ -328,6 +328,10 @@ module ApplicationHelper
end
end
def anchor(text)
text.to_s.gsub(' ', '_')
end
def html_hours(text)
text.gsub(%r{(\d+)\.(\d+)}, '<span class="hours hours-int">\1</span><span class="hours hours-dec">.\2</span>').html_safe
end
......
......@@ -9,7 +9,7 @@
<% else %>
<div id="roadmap">
<% @versions.each do |version| %>
<h3 class="version"><%= tag 'a', :name => h(version.name) %><%= link_to_version version %></h3>
<h3 class="version"><%= tag 'a', :name => anchor(version.name) %><%= link_to_version version %></h3>
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
<%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
......@@ -49,7 +49,7 @@
<h3><%= l(:label_version_plural) %></h3>
<% @versions.each do |version| %>
<%= link_to format_version_name(version), "##{version.name}" %><br />
<%= link_to format_version_name(version), :anchor => anchor(version.name) %><br />
<% end %>
<% end %>
......
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