Chris@1296: <%= link_to(@repository.identifier.present? ? h(@repository.identifier) : 'root', Chris@1296: :action => 'show', :id => @project, Chris@1296: :repository_id => @repository.identifier_param, Chris@1296: :path => nil, :rev => @rev) %> Chris@1296: <% Chris@1296: dirs = path.split('/') Chris@1296: if 'file' == kind Chris@1296: filename = dirs.pop Chris@1296: end Chris@1296: link_path = '' Chris@1296: dirs.each do |dir| Chris@1296: next if dir.blank? Chris@1296: link_path << '/' unless link_path.empty? Chris@1296: link_path << "#{dir}" Chris@1296: %> Chris@1296: / <%= link_to h(dir), :action => 'show', :id => @project, :repository_id => @repository.identifier_param, Chris@1296: :path => to_path_param(link_path), :rev => @rev %> Chris@1296: <% end %> Chris@1296: <% if filename %> Chris@1296: / <%= link_to h(filename), Chris@1296: :action => 'changes', :id => @project, :repository_id => @repository.identifier_param, Chris@1296: :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %> Chris@1296: <% end %> Chris@1296: <% Chris@1296: # @rev is revsion or Git and Mercurial branch or tag. Chris@1296: # For Mercurial *tip*, @rev and @changeset are nil. Chris@1296: rev_text = @changeset.nil? ? @rev : format_revision(@changeset) Chris@1296: %> Chris@1296: <%= "@ #{h rev_text}" unless rev_text.blank? %> Chris@1296: Chris@1296: <% html_title(with_leading_slash(path)) -%>