33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
<%= link_to @repository.identifier.present? ? h(@repository.identifier) : 'root',
|
|
{:action => 'show', :id => @project,
|
|
:repository_id => @repository.identifier_param,
|
|
:path => nil, :rev => @rev },
|
|
:class=>"fl c_blue f14 fb" %>
|
|
<%
|
|
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}"
|
|
%>
|
|
/ <%= link_to h(dir), :action => 'show', :id => @project, :repository_id => @repository.identifier_param,
|
|
:path => to_path_param(link_path), :rev => @rev %>
|
|
<% end %>
|
|
<% if filename %>
|
|
/ <%= link_to h(filename),
|
|
:action => 'changes', :id => @project, :repository_id => @repository.identifier_param,
|
|
:path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
|
|
<% end %>
|
|
<%
|
|
# @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)
|
|
%>
|
|
<p class="fl f14 fb c_grey02"><%= "@ #{h rev_text}" unless rev_text.blank? %></p>
|
|
|
|
<% html_title(with_leading_slash(path)) -%>
|