diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index cdb64f417..0876127a1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -96,6 +96,15 @@ module ApplicationHelper
link_to(h(text), {:controller => 'attachments', :action => action, :id => attachment, :filename => attachment.filename }, options)
end
+ # Generates a link to a SCM revision
+ # Options:
+ # * :text - Link text (default to the formatted revision)
+ def link_to_revision(revision, project, options={})
+ text = options.delete(:text) || format_revision(revision)
+
+ link_to(text, {:controller => 'repositories', :action => 'revision', :id => project, :rev => revision}, :title => l(:label_revision_id, revision))
+ end
+
def toggle_link(name, id, options={})
onclick = "Element.toggle('#{id}'); "
onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ")
diff --git a/app/views/repositories/_dir_list_content.rhtml b/app/views/repositories/_dir_list_content.rhtml
index 8b6a067b3..4e4589e1e 100644
--- a/app/views/repositories/_dir_list_content.rhtml
+++ b/app/views/repositories/_dir_list_content.rhtml
@@ -17,7 +17,7 @@
-<%= link_to format_revision(changeset.revision), :action => 'revision', :id => project, :rev => changeset.revision %> |
+<%= link_to_revision(changeset.revision, project) %> |
<%= radio_button_tag('rev', changeset.revision, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %> |
<%= radio_button_tag('rev_to', changeset.revision, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %> |
<%= format_time(changeset.committed_on) %> |
diff --git a/app/views/repositories/revision.rhtml b/app/views/repositories/revision.rhtml
index b205be37c..92597dff7 100644
--- a/app/views/repositories/revision.rhtml
+++ b/app/views/repositories/revision.rhtml
@@ -1,13 +1,13 @@
«
<% unless @changeset.previous.nil? -%>
- <%= link_to l(:label_previous), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.previous.revision %>
+ <%= link_to_revision(@changeset.previous.revision, @project, :text => l(:label_previous)) %>
<% else -%>
<%= l(:label_previous) %>
<% end -%>
|
<% unless @changeset.next.nil? -%>
- <%= link_to l(:label_next), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.next.revision %>
+ <%= link_to_revision(@changeset.next.revision, @project, :text => l(:label_next)) %>
<% else -%>
<%= l(:label_next) %>
<% end -%>
diff --git a/config/locales/bg.yml b/config/locales/bg.yml
index 4302542ce..1bc29d0ba 100644
--- a/config/locales/bg.yml
+++ b/config/locales/bg.yml
@@ -856,3 +856,4 @@ bg:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/bs.yml b/config/locales/bs.yml
index 5e33bb8ad..35097cf24 100644
--- a/config/locales/bs.yml
+++ b/config/locales/bs.yml
@@ -880,3 +880,4 @@ bs:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/ca.yml b/config/locales/ca.yml
index c5120180d..07feeea06 100644
--- a/config/locales/ca.yml
+++ b/config/locales/ca.yml
@@ -859,3 +859,4 @@ ca:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/cs.yml b/config/locales/cs.yml
index 4ad8ad62a..7ab2c2113 100644
--- a/config/locales/cs.yml
+++ b/config/locales/cs.yml
@@ -862,3 +862,4 @@ cs:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/da.yml b/config/locales/da.yml
index 246855811..2b2b378a4 100644
--- a/config/locales/da.yml
+++ b/config/locales/da.yml
@@ -882,3 +882,4 @@ da:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/de.yml b/config/locales/de.yml
index e11ffb525..fc2699f47 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -882,3 +882,4 @@ de:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/el.yml b/config/locales/el.yml
index 13f8f37c7..3b88da26f 100644
--- a/config/locales/el.yml
+++ b/config/locales/el.yml
@@ -862,3 +862,4 @@ el:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 3eee529d1..cab7ff4a7 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -580,6 +580,7 @@ en:
label_tag: Tag
label_revision: Revision
label_revision_plural: Revisions
+ label_revision_id: "Revision {{value}}"
label_associated_revisions: Associated revisions
label_added: added
label_modified: modified
diff --git a/config/locales/es.yml b/config/locales/es.yml
index c0aa91dba..a5c38a7c2 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -903,3 +903,4 @@ es:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/fi.yml b/config/locales/fi.yml
index 93d354dc4..c9e4c3136 100644
--- a/config/locales/fi.yml
+++ b/config/locales/fi.yml
@@ -892,3 +892,4 @@ fi:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index aa7fdafa9..b676cd2e6 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -885,3 +885,4 @@ fr:
enumeration_system_activity: Activité système
setting_gravatar_default: Default Gravatar image
setting_start_of_week: Start calendars on
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/gl.yml b/config/locales/gl.yml
index 363a54ef3..f540981fb 100644
--- a/config/locales/gl.yml
+++ b/config/locales/gl.yml
@@ -882,3 +882,4 @@ gl:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/he.yml b/config/locales/he.yml
index bc1723826..1eb00484e 100644
--- a/config/locales/he.yml
+++ b/config/locales/he.yml
@@ -866,3 +866,4 @@ he:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/hu.yml b/config/locales/hu.yml
index 8c9f289f9..a0961cd80 100644
--- a/config/locales/hu.yml
+++ b/config/locales/hu.yml
@@ -887,3 +887,4 @@
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/it.yml b/config/locales/it.yml
index 627daf347..2b5ee2fd3 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -869,3 +869,4 @@ it:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index 1257db260..5bf9fa185 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -891,3 +891,4 @@ ja:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/ko.yml b/config/locales/ko.yml
index 081c3acd4..91d8c0988 100644
--- a/config/locales/ko.yml
+++ b/config/locales/ko.yml
@@ -922,3 +922,4 @@ ko:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/lt.yml b/config/locales/lt.yml
index b21fb5c31..957f9ff88 100644
--- a/config/locales/lt.yml
+++ b/config/locales/lt.yml
@@ -930,3 +930,4 @@ lt:
label_update_issue_done_ratios: Update issue done ratios
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index 3acefe89f..37fa32a34 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -844,3 +844,4 @@ nl:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/no.yml b/config/locales/no.yml
index a8b064c0e..b4956011a 100644
--- a/config/locales/no.yml
+++ b/config/locales/no.yml
@@ -857,3 +857,4 @@
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/pl.yml b/config/locales/pl.yml
index d3e502196..64cec48ee 100644
--- a/config/locales/pl.yml
+++ b/config/locales/pl.yml
@@ -885,3 +885,4 @@ pl:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
index 6491b0c54..69da727b3 100644
--- a/config/locales/pt-BR.yml
+++ b/config/locales/pt-BR.yml
@@ -890,3 +890,4 @@ pt-BR:
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/pt.yml b/config/locales/pt.yml
index 24c24190c..7601b2022 100644
--- a/config/locales/pt.yml
+++ b/config/locales/pt.yml
@@ -874,3 +874,4 @@ pt:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/ro.yml b/config/locales/ro.yml
index 9a089118a..6217b8492 100644
--- a/config/locales/ro.yml
+++ b/config/locales/ro.yml
@@ -859,3 +859,4 @@ ro:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index c01e52a64..cde29d94a 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -970,3 +970,4 @@ ru:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/sk.yml b/config/locales/sk.yml
index a20630837..16a9f2607 100644
--- a/config/locales/sk.yml
+++ b/config/locales/sk.yml
@@ -861,3 +861,4 @@ sk:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/sl.yml b/config/locales/sl.yml
index 61f84ad8b..736e3db49 100644
--- a/config/locales/sl.yml
+++ b/config/locales/sl.yml
@@ -858,3 +858,4 @@ sl:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/sr.yml b/config/locales/sr.yml
index b58df8c60..ed4255501 100644
--- a/config/locales/sr.yml
+++ b/config/locales/sr.yml
@@ -877,3 +877,4 @@
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/sv.yml b/config/locales/sv.yml
index c73a75688..f674e77fd 100644
--- a/config/locales/sv.yml
+++ b/config/locales/sv.yml
@@ -911,3 +911,4 @@ sv:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/th.yml b/config/locales/th.yml
index 8ad86d00a..745c340fc 100644
--- a/config/locales/th.yml
+++ b/config/locales/th.yml
@@ -859,3 +859,4 @@ th:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/tr.yml b/config/locales/tr.yml
index e98b53f02..e41385979 100644
--- a/config/locales/tr.yml
+++ b/config/locales/tr.yml
@@ -889,3 +889,4 @@ tr:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/uk.yml b/config/locales/uk.yml
index 55dc50c56..df6469144 100644
--- a/config/locales/uk.yml
+++ b/config/locales/uk.yml
@@ -858,3 +858,4 @@ uk:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/vi.yml b/config/locales/vi.yml
index d498cb53c..31e6d0a41 100644
--- a/config/locales/vi.yml
+++ b/config/locales/vi.yml
@@ -921,3 +921,4 @@ vi:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml
index 03ca09c1d..46cbcafde 100644
--- a/config/locales/zh-TW.yml
+++ b/config/locales/zh-TW.yml
@@ -955,3 +955,4 @@
enumeration_doc_categories: 文件分類
enumeration_activities: 活動 (時間追蹤)
enumeration_system_activity: 系統活動
+ label_revision_id: Revision {{value}}
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index e34c5c3f3..1a41b40bc 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -886,3 +886,4 @@ zh:
setting_start_of_week: Start calendars on
permission_view_issues: View Issues
label_display_used_statuses_only: Only display statuses that are used by this tracker
+ label_revision_id: Revision {{value}}