_breadcrumbs.rhtml
28 lines
| 912 B
| text/html+ruby
|
RhtmlLexer
|
r2735 | <%= 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}" | ||||
%> | ||||
|
r5019 | / <%= link_to h(dir), :action => 'show', :id => @project, | ||
:path => to_path_param(link_path), :rev => @rev %> | ||||
|
r2735 | <% end %> | ||
<% if filename %> | ||||
|
r5019 | / <%= link_to h(filename), | ||
:action => 'changes', :id => @project, | ||||
:path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %> | ||||
|
r2735 | <% end %> | ||
|
r5019 | <% | ||
# @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) | ||||
%> | ||||
|
r5027 | <%= "@ #{h rev_text}" unless rev_text.blank? %> | ||
|
r2735 | |||
<% html_title(with_leading_slash(path)) -%> | ||||