annotate app/views/repositories/_breadcrumbs.html.erb @ 1465:ab8bd24eeb65 bug_635

Close obsolete branch bug_635
author Chris Cannam
date Fri, 19 Jul 2013 12:13:20 +0100
parents 433d4f72a19b
children 261b3d9a4903
rev   line source
Chris@1115 1 <%= link_to(@repository.identifier.present? ? h(@repository.identifier) : 'root',
Chris@1115 2 :action => 'show', :id => @project,
Chris@1115 3 :repository_id => @repository.identifier_param,
Chris@1115 4 :path => nil, :rev => @rev) %>
Chris@909 5 <%
Chris@0 6 dirs = path.split('/')
Chris@0 7 if 'file' == kind
Chris@0 8 filename = dirs.pop
Chris@0 9 end
Chris@0 10 link_path = ''
Chris@0 11 dirs.each do |dir|
Chris@0 12 next if dir.blank?
Chris@0 13 link_path << '/' unless link_path.empty?
Chris@909 14 link_path << "#{dir}"
Chris@0 15 %>
Chris@1115 16 / <%= link_to h(dir), :action => 'show', :id => @project, :repository_id => @repository.identifier_param,
Chris@441 17 :path => to_path_param(link_path), :rev => @rev %>
Chris@0 18 <% end %>
Chris@0 19 <% if filename %>
Chris@441 20 / <%= link_to h(filename),
Chris@1115 21 :action => 'changes', :id => @project, :repository_id => @repository.identifier_param,
Chris@441 22 :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
Chris@0 23 <% end %>
Chris@441 24 <%
Chris@441 25 # @rev is revsion or Git and Mercurial branch or tag.
Chris@441 26 # For Mercurial *tip*, @rev and @changeset are nil.
Chris@441 27 rev_text = @changeset.nil? ? @rev : format_revision(@changeset)
Chris@441 28 %>
Chris@441 29 <%= "@ #{h rev_text}" unless rev_text.blank? %>
Chris@0 30
Chris@0 31 <% html_title(with_leading_slash(path)) -%>