##// END OF EJS Templates
scm: fix revision graph left padding...
Toshi MARUYAMA -
r9438:6c6467879afd
parent child
Show More
@@ -1,48 +1,51
1 <% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
1 <% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
2 <%= if show_revision_graph && revisions && revisions.any?
2 <%= if show_revision_graph && revisions && revisions.any?
3 indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid|
3 indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid|
4 url_for(
4 url_for(
5 :controller => 'repositories',
5 :controller => 'repositories',
6 :action => 'revision',
6 :action => 'revision',
7 :id => project,
7 :id => project,
8 :repository_id => @repository.identifier_param,
8 :repository_id => @repository.identifier_param,
9 :rev => scmid)
9 :rev => scmid)
10 end
10 end
11 render :partial => 'revision_graph',
11 render :partial => 'revision_graph',
12 :locals => {
12 :locals => {
13 :commits => indexed_commits,
13 :commits => indexed_commits,
14 :space => graph_space
14 :space => graph_space
15 }
15 }
16 end %>
16 end %>
17 <%= form_tag(
17 <%= form_tag(
18 {:controller => 'repositories', :action => 'diff', :id => project,
18 {:controller => 'repositories', :action => 'diff', :id => project,
19 :repository_id => @repository.identifier_param, :path => to_path_param(path)},
19 :repository_id => @repository.identifier_param, :path => to_path_param(path)},
20 :method => :get
20 :method => :get
21 ) do %>
21 ) do %>
22 <table class="list changesets">
22 <table class="list changesets">
23 <thead><tr>
23 <thead><tr>
24 <th>#</th>
24 <th>#</th>
25 <th></th>
25 <th></th>
26 <th></th>
26 <th></th>
27 <th><%= l(:label_date) %></th>
27 <th><%= l(:label_date) %></th>
28 <th><%= l(:field_author) %></th>
28 <th><%= l(:field_author) %></th>
29 <th><%= l(:field_comments) %></th>
29 <th><%= l(:field_comments) %></th>
30 </tr></thead>
30 </tr></thead>
31 <tbody>
31 <tbody>
32 <% show_diff = revisions.size > 1 %>
32 <% show_diff = revisions.size > 1 %>
33 <% line_num = 1 %>
33 <% line_num = 1 %>
34 <% revisions.each do |changeset| %>
34 <% revisions.each do |changeset| %>
35 <tr class="changeset <%= cycle 'odd', 'even' %>">
35 <tr class="changeset <%= cycle 'odd', 'even' %>">
36 <td class="id"<%= show_revision_graph ? " style=\"padding-left:#{(graph_space + 1) * 20}px\"" : '' %>><%= link_to_revision(changeset, @repository) %></td>
36 <% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
37 <%= content_tag(:td, :class => 'id', :style => id_style) do %>
38 <%= link_to_revision(changeset, @repository) %>
39 <% end %>
37 <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>
40 <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>
38 <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>
41 <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>
39 <td class="committed_on"><%= format_time(changeset.committed_on) %></td>
42 <td class="committed_on"><%= format_time(changeset.committed_on) %></td>
40 <td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
43 <td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
41 <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
44 <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
42 </tr>
45 </tr>
43 <% line_num += 1 %>
46 <% line_num += 1 %>
44 <% end %>
47 <% end %>
45 </tbody>
48 </tbody>
46 </table>
49 </table>
47 <%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
50 <%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
48 <% end %>
51 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now