comparison app/views/repositories/_breadcrumbs.html.erb @ 1115:433d4f72a19b redmine-2.2

Update to Redmine SVN revision 11137 on 2.2-stable branch
author Chris Cannam
date Mon, 07 Jan 2013 12:01:42 +0000
parents cbb26bc654de
children 261b3d9a4903
comparison
equal deleted inserted replaced
929:5f33065ddc4b 1115:433d4f72a19b
1 <%= link_to 'root', :action => 'show', :id => @project, :path => '', :rev => @rev %> 1 <%= link_to(@repository.identifier.present? ? h(@repository.identifier) : 'root',
2 :action => 'show', :id => @project,
3 :repository_id => @repository.identifier_param,
4 :path => nil, :rev => @rev) %>
2 <% 5 <%
3 dirs = path.split('/') 6 dirs = path.split('/')
4 if 'file' == kind 7 if 'file' == kind
5 filename = dirs.pop 8 filename = dirs.pop
6 end 9 end
8 dirs.each do |dir| 11 dirs.each do |dir|
9 next if dir.blank? 12 next if dir.blank?
10 link_path << '/' unless link_path.empty? 13 link_path << '/' unless link_path.empty?
11 link_path << "#{dir}" 14 link_path << "#{dir}"
12 %> 15 %>
13 / <%= link_to h(dir), :action => 'show', :id => @project, 16 / <%= link_to h(dir), :action => 'show', :id => @project, :repository_id => @repository.identifier_param,
14 :path => to_path_param(link_path), :rev => @rev %> 17 :path => to_path_param(link_path), :rev => @rev %>
15 <% end %> 18 <% end %>
16 <% if filename %> 19 <% if filename %>
17 / <%= link_to h(filename), 20 / <%= link_to h(filename),
18 :action => 'changes', :id => @project, 21 :action => 'changes', :id => @project, :repository_id => @repository.identifier_param,
19 :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %> 22 :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
20 <% end %> 23 <% end %>
21 <% 24 <%
22 # @rev is revsion or Git and Mercurial branch or tag. 25 # @rev is revsion or Git and Mercurial branch or tag.
23 # For Mercurial *tip*, @rev and @changeset are nil. 26 # For Mercurial *tip*, @rev and @changeset are nil.