_breadcrumbs.html.erb
31 lines
| 1.1 KiB
| text/plain
|
TextLexer
|
r13661 | <%= link_to(@repository.identifier.present? ? @repository.identifier : 'root', | ||
|
r9430 | :action => 'show', :id => @project, | ||
:repository_id => @repository.identifier_param, | ||||
:path => nil, :rev => @rev) %> | ||||
|
r7146 | <% | ||
|
r2735 | 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? | ||||
|
r7146 | link_path << "#{dir}" | ||
|
r2735 | %> | ||
|
r13661 | / <%= link_to dir, :action => 'show', :id => @project, :repository_id => @repository.identifier_param, | ||
|
r5019 | :path => to_path_param(link_path), :rev => @rev %> | ||
|
r2735 | <% end %> | ||
<% if filename %> | ||||
|
r13661 | / <%= link_to filename, | ||
|
r8530 | :action => 'changes', :id => @project, :repository_id => @repository.identifier_param, | ||
|
r5019 | :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) | ||||
%> | ||||
|
r13661 | <%= "@ #{rev_text}" unless rev_text.blank? %> | ||
|
r2735 | |||
|
r7445 | <% html_title(with_leading_slash(path)) -%> | ||