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