##// 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 <% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => to_path_param(path)}, :method => :get) do %>
2 <% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => to_path_param(path)}, :method => :get) do %>
2 <table class="list changesets">
3 <table class="list changesets">
3 <thead><tr>
4 <thead><tr>
4 <% if @repository.supports_revision_graph? %>
5 <% if show_revision_graph %>
5 <th></th>
6 <th></th>
6 <% end %>
7 <% end %>
7 <th>#</th>
8 <th>#</th>
8 <th></th>
9 <th></th>
9 <th></th>
10 <th></th>
10 <th><%= l(:label_date) %></th>
11 <th><%= l(:label_date) %></th>
11 <th><%= l(:field_author) %></th>
12 <th><%= l(:field_author) %></th>
12 <th><%= l(:field_comments) %></th>
13 <th><%= l(:field_comments) %></th>
13 </tr></thead>
14 </tr></thead>
14 <tbody>
15 <tbody>
15 <% show_diff = revisions.size > 1 %>
16 <% show_diff = revisions.size > 1 %>
16 <% line_num = 1 %>
17 <% line_num = 1 %>
17 <% revisions.each do |changeset| %>
18 <% revisions.each do |changeset| %>
18 <tr class="changeset <%= cycle 'odd', 'even' %>">
19 <tr class="changeset <%= cycle 'odd', 'even' %>">
19 <% if @repository.supports_revision_graph? %>
20 <% if show_revision_graph %>
20 <% if line_num == 1 %>
21 <% if line_num == 1 %>
21 <td class="revision_graph" rowspan="<%= revisions.size %>">
22 <td class="revision_graph" rowspan="<%= revisions.size %>">
22 <% href_base = Proc.new {|x| url_for(:controller => 'repositories',
23 <% href_base = Proc.new {|x| url_for(:controller => 'repositories',
23 :action => 'revision',
24 :action => 'revision',
24 :id => project,
25 :id => project,
25 :rev => x) } %>
26 :rev => x) } %>
26 <%= render :partial => 'revision_graph',
27 <%= render :partial => 'revision_graph',
27 :locals => {
28 :locals => {
28 :commits => index_commits(
29 :commits => index_commits(
29 revisions,
30 revisions,
30 @repository.branches,
31 @repository.branches,
31 href_base
32 href_base
32 )
33 )
33 } %>
34 } %>
34 </td>
35 </td>
35 <% end %>
36 <% end %>
36 <% end %>
37 <% end %>
37 <td class="id"><%= link_to_revision(changeset, project) %></td>
38 <td class="id"><%= link_to_revision(changeset, project) %></td>
38 <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 <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 <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 <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 <td class="committed_on"><%= format_time(changeset.committed_on) %></td>
41 <td class="committed_on"><%= format_time(changeset.committed_on) %></td>
41 <td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
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 <td class="comments_nowrap">
44 <td class="comments_nowrap">
44 <%= textilizable(truncate(truncate_at_line_break(changeset.comments, 0), :length => 90)) %>
45 <%= textilizable(truncate(truncate_at_line_break(changeset.comments, 0), :length => 90)) %>
45 </td>
46 </td>
46 <% else %>
47 <% else %>
47 <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
48 <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
48 <% end %>
49 <% end %>
49 </tr>
50 </tr>
50 <% line_num += 1 %>
51 <% line_num += 1 %>
51 <% end %>
52 <% end %>
52 </tbody>
53 </tbody>
53 </table>
54 </table>
54 <%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
55 <%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
55 <% end %>
56 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now