Mercurial > hg > soundsoftware-site
comparison app/views/repositories/_revisions.html.erb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | c6c2cbd0afee |
children | 433d4f72a19b |
comparison
equal
deleted
inserted
replaced
908:c6c2cbd0afee | 909:cbb26bc654de |
---|---|
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> |
5 <% if show_revision_graph %> | |
6 <th></th> | |
7 <% end %> | |
4 <th>#</th> | 8 <th>#</th> |
5 <th></th> | 9 <th></th> |
6 <th></th> | 10 <th></th> |
7 <th><%= l(:label_date) %></th> | 11 <th><%= l(:label_date) %></th> |
8 <th><%= l(:field_author) %></th> | 12 <th><%= l(:field_author) %></th> |
11 <tbody> | 15 <tbody> |
12 <% show_diff = revisions.size > 1 %> | 16 <% show_diff = revisions.size > 1 %> |
13 <% line_num = 1 %> | 17 <% line_num = 1 %> |
14 <% revisions.each do |changeset| %> | 18 <% revisions.each do |changeset| %> |
15 <tr class="changeset <%= cycle 'odd', 'even' %>"> | 19 <tr class="changeset <%= cycle 'odd', 'even' %>"> |
20 <% if show_revision_graph %> | |
21 <% if line_num == 1 %> | |
22 <td class="revision_graph" rowspan="<%= revisions.size %>"> | |
23 <% href_base = Proc.new {|x| url_for(:controller => 'repositories', | |
24 :action => 'revision', | |
25 :id => project, | |
26 :rev => x) } %> | |
27 <%= render :partial => 'revision_graph', | |
28 :locals => { | |
29 :commits => index_commits( | |
30 revisions, | |
31 @repository.branches, | |
32 href_base | |
33 ) | |
34 } %> | |
35 </td> | |
36 <% end %> | |
37 <% end %> | |
16 <td class="id"><%= link_to_revision(changeset, project) %></td> | 38 <td class="id"><%= link_to_revision(changeset, project) %></td> |
17 <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> |
18 <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> |
19 <td class="committed_on"><%= format_time(changeset.committed_on) %></td> | 41 <td class="committed_on"><%= format_time(changeset.committed_on) %></td> |
20 <td class="author"><%=h changeset.author %></td> | 42 <td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td> |
21 <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td> | 43 <% if show_revision_graph %> |
44 <td class="comments_nowrap"> | |
45 <%= textilizable(truncate(truncate_at_line_break(changeset.comments, 0), :length => 90)) %> | |
46 </td> | |
47 <% else %> | |
48 <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td> | |
49 <% end %> | |
22 </tr> | 50 </tr> |
23 <% line_num += 1 %> | 51 <% line_num += 1 %> |
24 <% end %> | 52 <% end %> |
25 </tbody> | 53 </tbody> |
26 </table> | 54 </table> |