annotate app/views/repositories/_breadcrumbs.html.erb @ 1475:23412bce0576
bug_522
Close obsolete branch bug_522
author |
Chris Cannam |
date |
Sat, 27 Oct 2012 17:18:52 +0100 |
parents |
cbb26bc654de |
children |
433d4f72a19b |
rev |
line source |
Chris@0
|
1 <%= link_to 'root', :action => 'show', :id => @project, :path => '', :rev => @rev %>
|
Chris@909
|
2 <%
|
Chris@0
|
3 dirs = path.split('/')
|
Chris@0
|
4 if 'file' == kind
|
Chris@0
|
5 filename = dirs.pop
|
Chris@0
|
6 end
|
Chris@0
|
7 link_path = ''
|
Chris@0
|
8 dirs.each do |dir|
|
Chris@0
|
9 next if dir.blank?
|
Chris@0
|
10 link_path << '/' unless link_path.empty?
|
Chris@909
|
11 link_path << "#{dir}"
|
Chris@0
|
12 %>
|
Chris@441
|
13 / <%= link_to h(dir), :action => 'show', :id => @project,
|
Chris@441
|
14 :path => to_path_param(link_path), :rev => @rev %>
|
Chris@0
|
15 <% end %>
|
Chris@0
|
16 <% if filename %>
|
Chris@441
|
17 / <%= link_to h(filename),
|
Chris@441
|
18 :action => 'changes', :id => @project,
|
Chris@441
|
19 :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
|
Chris@0
|
20 <% end %>
|
Chris@441
|
21 <%
|
Chris@441
|
22 # @rev is revsion or Git and Mercurial branch or tag.
|
Chris@441
|
23 # For Mercurial *tip*, @rev and @changeset are nil.
|
Chris@441
|
24 rev_text = @changeset.nil? ? @rev : format_revision(@changeset)
|
Chris@441
|
25 %>
|
Chris@441
|
26 <%= "@ #{h rev_text}" unless rev_text.blank? %>
|
Chris@0
|
27
|
Chris@0
|
28 <% html_title(with_leading_slash(path)) -%>
|