##// END OF EJS Templates
scm: git: mercurial: not show revision graph in sub directory (#5501)...
Toshi MARUYAMA -
r7902:3d379c4d0732
parent child
Show More
@@ -1,55 +1,56
1 <% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
1 2 <% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => to_path_param(path)}, :method => :get) do %>
2 3 <table class="list changesets">
3 4 <thead><tr>
4 <% if @repository.supports_revision_graph? %>
5 <% if show_revision_graph %>
5 6 <th></th>
6 7 <% end %>
7 8 <th>#</th>
8 9 <th></th>
9 10 <th></th>
10 11 <th><%= l(:label_date) %></th>
11 12 <th><%= l(:field_author) %></th>
12 13 <th><%= l(:field_comments) %></th>
13 14 </tr></thead>
14 15 <tbody>
15 16 <% show_diff = revisions.size > 1 %>
16 17 <% line_num = 1 %>
17 18 <% revisions.each do |changeset| %>
18 19 <tr class="changeset <%= cycle 'odd', 'even' %>">
19 <% if @repository.supports_revision_graph? %>
20 <% if show_revision_graph %>
20 21 <% if line_num == 1 %>
21 22 <td class="revision_graph" rowspan="<%= revisions.size %>">
22 23 <% href_base = Proc.new {|x| url_for(:controller => 'repositories',
23 24 :action => 'revision',
24 25 :id => project,
25 26 :rev => x) } %>
26 27 <%= render :partial => 'revision_graph',
27 28 :locals => {
28 29 :commits => index_commits(
29 30 revisions,
30 31 @repository.branches,
31 32 href_base
32 33 )
33 34 } %>
34 35 </td>
35 36 <% end %>
36 37 <% end %>
37 38 <td class="id"><%= link_to_revision(changeset, project) %></td>
38 39 <td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %></td>
39 40 <td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td>
40 41 <td class="committed_on"><%= format_time(changeset.committed_on) %></td>
41 42 <td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
42 <% if @repository.supports_revision_graph? %>
43 <% if show_revision_graph %>
43 44 <td class="comments_nowrap">
44 45 <%= textilizable(truncate(truncate_at_line_break(changeset.comments, 0), :length => 90)) %>
45 46 </td>
46 47 <% else %>
47 48 <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
48 49 <% end %>
49 50 </tr>
50 51 <% line_num += 1 %>
51 52 <% end %>
52 53 </tbody>
53 54 </table>
54 55 <%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
55 56 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now