diff options
Diffstat (limited to 'app/views/repositories/_navigation.rhtml')
-rw-r--r-- | app/views/repositories/_navigation.rhtml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/views/repositories/_navigation.rhtml b/app/views/repositories/_navigation.rhtml new file mode 100644 index 000000000..3ae0f7612 --- /dev/null +++ b/app/views/repositories/_navigation.rhtml @@ -0,0 +1,18 @@ +<%= link_to 'root', :action => 'browse', :id => @project, :path => '', :rev => @rev %>
+<%
+dirs = path.split('/')
+if 'file' == kind
+ filename = dirs.pop
+end
+link_path = ''
+dirs.each do |dir|
+ link_path << '/' unless link_path.empty?
+ link_path << "#{dir}"
+ %>
+ / <%= link_to h(dir), :action => 'browse', :id => @project, :path => link_path, :rev => @rev %>
+<% end %>
+<% if filename %>
+ / <%= link_to h(filename), :action => 'revisions', :id => @project, :path => "#{link_path}/#{filename}", :rev => @rev %>
+<% end %>
+
+<%= "@ #{revision}" if revision %>
\ No newline at end of file |