diff app/views/repositories/_breadcrumbs.rhtml @ 441:cbce1fd3b1b7 redmine-1.2

Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author Chris Cannam
date Mon, 06 Jun 2011 14:24:13 +0100
parents 0579821a129a
children
line wrap: on
line diff
--- a/app/views/repositories/_breadcrumbs.rhtml	Thu Mar 03 11:42:28 2011 +0000
+++ b/app/views/repositories/_breadcrumbs.rhtml	Mon Jun 06 14:24:13 2011 +0100
@@ -10,12 +10,19 @@
     link_path << '/' unless link_path.empty?
     link_path << "#{dir}" 
     %>
-    / <%= link_to h(dir), :action => 'show', :id => @project, :path => to_path_param(link_path), :rev => @rev %>
+    / <%= link_to h(dir), :action => 'show', :id => @project,
+                :path => to_path_param(link_path), :rev => @rev %>
 <% end %>
 <% if filename %>
-    / <%= link_to h(filename), :action => 'changes', :id => @project, :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
+    / <%= link_to h(filename),
+                   :action => 'changes', :id => @project,
+                   :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
 <% end %>
-
-<%= "@ #{h format_revision(@changeset)}" if @changeset %>
+<%
+  # @rev is revsion or Git and Mercurial branch or tag.
+  # For Mercurial *tip*, @rev and @changeset are nil.
+  rev_text = @changeset.nil? ? @rev : format_revision(@changeset)
+%>
+<%= "@ #{h rev_text}" unless rev_text.blank? %>
 
 <% html_title(with_leading_slash(path)) -%>