]> source.dussan.org Git - redmine.git/commitdiff
Added the revision title to any revision links.
authorEric Davis <edavis@littlestreamsoftware.com>
Tue, 22 Dec 2009 23:23:54 +0000 (23:23 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Tue, 22 Dec 2009 23:23:54 +0000 (23:23 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3216 e93f8b46-1217-0410-a6f0-8f06a7374b81

39 files changed:
app/helpers/application_helper.rb
app/views/repositories/_dir_list_content.rhtml
app/views/repositories/_revisions.rhtml
app/views/repositories/revision.rhtml
config/locales/bg.yml
config/locales/bs.yml
config/locales/ca.yml
config/locales/cs.yml
config/locales/da.yml
config/locales/de.yml
config/locales/el.yml
config/locales/en.yml
config/locales/es.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/gl.yml
config/locales/he.yml
config/locales/hu.yml
config/locales/it.yml
config/locales/ja.yml
config/locales/ko.yml
config/locales/lt.yml
config/locales/nl.yml
config/locales/no.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt.yml
config/locales/ro.yml
config/locales/ru.yml
config/locales/sk.yml
config/locales/sl.yml
config/locales/sr.yml
config/locales/sv.yml
config/locales/th.yml
config/locales/tr.yml
config/locales/uk.yml
config/locales/vi.yml
config/locales/zh-TW.yml
config/locales/zh.yml

index cdb64f4173859234fbee4db209047b7341aaf702..0876127a14966d85d9536208d2ee47dadfe1a50b 100644 (file)
@@ -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(); ")
index 8b6a067b35f00d468cbf6de82209930eb462dc46..4e4589e1e1e83068297a52305ca8ac47b3331db4 100644 (file)
@@ -17,7 +17,7 @@
 </td>
 <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
 <% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
-<td class="revision"><%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %></td>
+<td class="revision"><%= link_to_revision(changeset.revision, @project) if changeset %></td>
 <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
 <td class="author"><%= changeset.nil? ? h(entry.lastrev.author.to_s.split('<').first) : changeset.author if entry.lastrev %></td>
 <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td>
index 8fb15525f617cc3380243df1a4f62a2895c91ddc..26fb5b6992a7e0dc54848c3706683224d482c039 100644 (file)
@@ -13,7 +13,7 @@
 <% line_num = 1 %>
 <% revisions.each do |changeset| %>
 <tr class="changeset <%= cycle 'odd', 'even' %>">
-<td class="id"><%= link_to format_revision(changeset.revision), :action => 'revision', :id => project, :rev => changeset.revision %></td>
+<td class="id"><%= link_to_revision(changeset.revision, project) %></td>
 <td class="checkbox"><%= 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) %></td>
 <td class="checkbox"><%= 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) %></td>
 <td class="committed_on"><%= format_time(changeset.committed_on) %></td>
index b205be37cacc417e9e41195f06db46888db282bd..92597dff7c993b8d1b02c250a4d640712510cb13 100644 (file)
@@ -1,13 +1,13 @@
 <div class="contextual">
   &#171;
   <% 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 -%>
index 4302542ceeb8b4bfdcd123f85124652ae63d7d89..1bc29d0ba91a73e53ae92f31f3dbe61612d83520 100644 (file)
@@ -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}}
index 5e33bb8ade0623a38777fa71f7d1461a55ad1991..35097cf24d66296574a65a3b74a66e6246b38173 100644 (file)
@@ -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}}
index c5120180d5c336017863af0a861cdc4b67b4366a..07feeea065e498f54bad4205e75955f63d6e40c7 100644 (file)
@@ -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}}
index 4ad8ad62a7102df6e636e2d8db0b7afb3e3c8258..7ab2c2113eb0777663db927bd98a3c49e707359e 100644 (file)
@@ -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}}
index 246855811f9238204914faaa94b9e1ca548d625f..2b2b378a4ea697c7c5985c012998dc3f5035d73b 100644 (file)
@@ -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}}
index e11ffb52589bff1fdf61be1c9b38ad5ba50acc93..fc2699f47907fb3db807909ce8218113ad335bf7 100644 (file)
@@ -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}}
index 13f8f37c7b88d84d5960a79e0675221c601c65b7..3b88da26f883fc64e665d50ab3931ba19a23b4d9 100644 (file)
@@ -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}}
index 3eee529d1500c9ef603fa10d1ae5717b0dbe662b..cab7ff4a73641cc1b5edce248b1940dfc090490e 100644 (file)
@@ -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
index c0aa91dba001f7d0164ace70cf6e0dd3199e567e..a5c38a7c2e553b682b2c419b29a3e4ad7ebe2285 100644 (file)
@@ -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}}
index 93d354dc4ed622a9db75923c34dad17b9f9136f0..c9e4c31368dbf55a908f8c9114b32c4cba3094bd 100644 (file)
@@ -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}}
index aa7fdafa9e3774c7473b9e5d60389001c6840574..b676cd2e6205b8564536da76aa96c88aabc2ddb3 100644 (file)
@@ -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}}
index 363a54ef3d374282fdc743ac3495968bac4ea768..f540981fb610fece1ffbbdbc904b45471aed038b 100644 (file)
@@ -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}}
index bc17238267ff51b1fd9083e36b658717181831c0..1eb00484e3e724cbcbbe4611d76502f77f3ce5ca 100644 (file)
@@ -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}}
index 8c9f289f9a0b17450ed87f9e82973e9aa8de7279..a0961cd80503034811fa58600ac3e72b2bc00d8f 100644 (file)
   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}}
index 627daf3473ffa1aa77546a5f4dc075f60beb6776..2b5ee2fd3e1fb1028e8f8097330e0315abba415b 100644 (file)
@@ -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}}
index 1257db2608a594ce938875fdcf48a19991689d69..5bf9fa185901cea47c7472433378196cd13c5b6e 100644 (file)
@@ -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}}
index 081c3acd4b962753c542b132c546f6cea64a3853..91d8c09888978b03e839e06581f5bb3d5332299a 100644 (file)
@@ -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}}
index b21fb5c3160b9683cd18deefed8db0d5c189fa55..957f9ff88abba89b84bdb2826db1f46571657987 100644 (file)
@@ -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}}
index 3acefe89f279737ee0d2befcd297e2a41c4ad40a..37fa32a3482f7aec3c04d32d1a8e6476c4b0b4e3 100644 (file)
@@ -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}}
index a8b064c0e7ab957b23afc169086facc203d87632..b4956011a9bb272eb5d28810bb217bd9c652b408 100644 (file)
   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}}
index d3e5021963ba7c64917eac6ac6bc971cb601aa80..64cec48ee7b8a066e1a4fcb647c7c91dc17e23fd 100644 (file)
@@ -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}}
index 6491b0c5468ffaf0fc4ed2ab1a758195c66bce96..69da727b31a1b1be2022ccca7c8c86efb9cc4c76 100644 (file)
@@ -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}}
index 24c24190c6417930d6708045e136e145926bcb56..7601b2022eae082bc794e9a53c4bdf2fd10ea4d5 100644 (file)
@@ -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}}
index 9a089118a2eedff4e62b7214ce8b59eb163c23c5..6217b849228e183a561fdcc2d46a2acd7cd3ac8a 100644 (file)
@@ -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}}
index c01e52a64f8fdf5cddd9e6e06bf89291117cc52d..cde29d94a4d3a713bcd08f5f3a752c56b29d44ef 100644 (file)
@@ -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}}
index a20630837746fc62dbee3203164f261310013b29..16a9f2607f180f21791ae08f3d107a1805577c58 100644 (file)
@@ -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}}
index 61f84ad8b561ce335e4c9daef0add1c4ae540561..736e3db494b8f915e7ec380f7bd513cc54e9dac3 100644 (file)
@@ -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}}
index b58df8c60061ab6346914a05ace464021c7511ec..ed42555010382b9fee39e3c83855973826b564dc 100644 (file)
   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}}
index c73a756882ad7ea820a6bbc1ede3ec61df3a5707..f674e77fdb7340dfd226e606e540dfaa4833ac95 100644 (file)
@@ -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}}
index 8ad86d00aea339b3ffb4059d280a0989cfac425e..745c340fc28718247a869593242e7fbe62fe2408 100644 (file)
@@ -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}}
index e98b53f02e957d6440a356e725fe81769eefd69f..e41385979cdbee4c42430c75fe2d4c16a3689faa 100644 (file)
@@ -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}}
index 55dc50c56e3eb33f163ea0906f49af5479519945..df6469144f052af2053361066060b73b73428706 100644 (file)
@@ -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}}
index d498cb53c1e9674d96405cce6da95680290e257b..31e6d0a41de0ac558273f0316690fc9f37dbd4dc 100644 (file)
@@ -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}}
index 03ca09c1d4d7263fbd26c7aea1e35418cb068cdf..46cbcafde7b188b269f22823a2a63fdebf03064d 100644 (file)
   enumeration_doc_categories: 文件分類
   enumeration_activities: 活動 (時間追蹤)
   enumeration_system_activity: 系統活動
+  label_revision_id: Revision {{value}}
index e34c5c3f391580afb901388632834ec1d9ddd7c7..1a41b40bc385c11928527ce22329f377c4132993 100644 (file)
@@ -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}}