You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_breadcrumbs.html.erb 1.1KB

12345678910111213141516171819202122232425262728293031
  1. <%= link_to(@repository.identifier.present? ? @repository.identifier : 'root',
  2. :action => 'show', :id => @project,
  3. :repository_id => @repository.identifier_param,
  4. :path => nil, :rev => @rev) %>
  5. <%
  6. dirs = path.split('/')
  7. if 'file' == kind
  8. filename = dirs.pop
  9. end
  10. link_path = ''
  11. dirs.each do |dir|
  12. next if dir.blank?
  13. link_path << '/' unless link_path.empty?
  14. link_path << "#{dir}"
  15. %>
  16. / <%= link_to dir, :action => 'show', :id => @project, :repository_id => @repository.identifier_param,
  17. :path => to_path_param(link_path), :rev => @rev %>
  18. <% end %>
  19. <% if filename %>
  20. / <%= link_to filename,
  21. :action => 'entry', :id => @project, :repository_id => @repository.identifier_param,
  22. :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
  23. <% end %>
  24. <%
  25. # @rev is revsion or Git and Mercurial branch or tag.
  26. # For Mercurial *tip*, @rev and @changeset are nil.
  27. rev_text = @changeset.nil? ? @rev : format_revision(@changeset)
  28. %>
  29. <%= "@ #{rev_text}" unless rev_text.blank? %>
  30. <% html_title(with_leading_slash(path)) -%>