annotate app/views/repositories/_breadcrumbs.rhtml @ 1452:d6b9fd02bb89
feature_36_js_refactoring
Deprecated develoment branch.
author |
luisf <luis.figueira@eecs.qmul.ac.uk> |
date |
Fri, 11 Oct 2013 17:01:24 +0100 |
parents |
cbce1fd3b1b7 |
children |
|
rev |
line source |
Chris@0
|
1 <%= link_to 'root', :action => 'show', :id => @project, :path => '', :rev => @rev %>
|
Chris@0
|
2 <%
|
Chris@0
|
3 dirs = path.split('/')
|
Chris@0
|
4 if 'file' == kind
|
Chris@0
|
5 filename = dirs.pop
|
Chris@0
|
6 end
|
Chris@0
|
7 link_path = ''
|
Chris@0
|
8 dirs.each do |dir|
|
Chris@0
|
9 next if dir.blank?
|
Chris@0
|
10 link_path << '/' unless link_path.empty?
|
Chris@0
|
11 link_path << "#{dir}"
|
Chris@0
|
12 %>
|
Chris@441
|
13 / <%= link_to h(dir), :action => 'show', :id => @project,
|
Chris@441
|
14 :path => to_path_param(link_path), :rev => @rev %>
|
Chris@0
|
15 <% end %>
|
Chris@0
|
16 <% if filename %>
|
Chris@441
|
17 / <%= link_to h(filename),
|
Chris@441
|
18 :action => 'changes', :id => @project,
|
Chris@441
|
19 :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
|
Chris@0
|
20 <% end %>
|
Chris@441
|
21 <%
|
Chris@441
|
22 # @rev is revsion or Git and Mercurial branch or tag.
|
Chris@441
|
23 # For Mercurial *tip*, @rev and @changeset are nil.
|
Chris@441
|
24 rev_text = @changeset.nil? ? @rev : format_revision(@changeset)
|
Chris@441
|
25 %>
|
Chris@441
|
26 <%= "@ #{h rev_text}" unless rev_text.blank? %>
|
Chris@0
|
27
|
Chris@0
|
28 <% html_title(with_leading_slash(path)) -%>
|