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