diff app/views/repositories/_breadcrumbs.rhtml @ 0:513646585e45

* Import Redmine trunk SVN rev 3859
author Chris Cannam
date Fri, 23 Jul 2010 15:52:44 +0100
parents
children 0579821a129a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/repositories/_breadcrumbs.rhtml	Fri Jul 23 15:52:44 2010 +0100
@@ -0,0 +1,21 @@
+<%= link_to 'root', :action => 'show', :id => @project, :path => '', :rev => @rev %>
+<% 
+dirs = path.split('/')
+if 'file' == kind
+    filename = dirs.pop
+end
+link_path = ''
+dirs.each do |dir|
+    next if dir.blank?
+    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 %>
+<% end %>
+<% if filename %>
+    / <%= link_to h(filename), :action => 'changes', :id => @project, :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
+<% end %>
+
+<%= "@ #{h revision}" if revision %>
+
+<% html_title(with_leading_slash(path)) -%>