2011-12-02 03:41:03 +04:00
|
|
|
<% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
|
2008-07-04 21:58:14 +04:00
|
|
|
<% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => to_path_param(path)}, :method => :get) do %>
|
2008-01-03 01:41:53 +03:00
|
|
|
<table class="list changesets">
|
2007-03-25 16:12:15 +04:00
|
|
|
<thead><tr>
|
2011-12-02 03:41:03 +04:00
|
|
|
<% if show_revision_graph %>
|
|
|
|
<th></th>
|
2011-11-03 15:36:12 +04:00
|
|
|
<% end %>
|
2007-03-25 16:12:15 +04:00
|
|
|
<th>#</th>
|
2007-05-10 21:28:18 +04:00
|
|
|
<th></th>
|
|
|
|
<th></th>
|
2007-03-25 16:12:15 +04:00
|
|
|
<th><%= l(:label_date) %></th>
|
2007-04-03 23:16:09 +04:00
|
|
|
<th><%= l(:field_author) %></th>
|
2007-04-25 19:06:20 +04:00
|
|
|
<th><%= l(:field_comments) %></th>
|
2007-03-25 16:12:15 +04:00
|
|
|
</tr></thead>
|
|
|
|
<tbody>
|
2009-09-01 16:13:17 +04:00
|
|
|
<% show_diff = revisions.size > 1 %>
|
2007-05-10 21:28:18 +04:00
|
|
|
<% line_num = 1 %>
|
2007-10-15 22:41:27 +04:00
|
|
|
<% revisions.each do |changeset| %>
|
2008-01-03 01:41:53 +03:00
|
|
|
<tr class="changeset <%= cycle 'odd', 'even' %>">
|
2011-12-02 03:41:03 +04:00
|
|
|
<% if show_revision_graph %>
|
2011-11-03 15:36:12 +04:00
|
|
|
<% if line_num == 1 %>
|
|
|
|
<td class="revision_graph" rowspan="<%= revisions.size %>">
|
|
|
|
<% href_base = Proc.new {|x| url_for(:controller => 'repositories',
|
|
|
|
:action => 'revision',
|
|
|
|
:id => project,
|
|
|
|
:rev => x) } %>
|
|
|
|
<%= render :partial => 'revision_graph',
|
|
|
|
:locals => {
|
|
|
|
:commits => index_commits(
|
|
|
|
revisions,
|
|
|
|
@repository.branches,
|
|
|
|
href_base
|
|
|
|
)
|
|
|
|
} %>
|
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2011-01-02 12:45:05 +03:00
|
|
|
<td class="id"><%= link_to_revision(changeset, project) %></td>
|
|
|
|
<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>
|
|
|
|
<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>
|
2008-01-03 01:41:53 +03:00
|
|
|
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
2011-10-21 17:08:11 +04:00
|
|
|
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
|
2011-12-02 03:41:03 +04:00
|
|
|
<% if show_revision_graph %>
|
2011-11-03 15:36:12 +04:00
|
|
|
<td class="comments_nowrap">
|
|
|
|
<%= textilizable(truncate(truncate_at_line_break(changeset.comments, 0), :length => 90)) %>
|
|
|
|
</td>
|
|
|
|
<% else %>
|
|
|
|
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
|
|
|
|
<% end %>
|
2007-03-25 16:12:15 +04:00
|
|
|
</tr>
|
2007-05-10 21:28:18 +04:00
|
|
|
<% line_num += 1 %>
|
2007-03-25 16:12:15 +04:00
|
|
|
<% end %>
|
|
|
|
</tbody>
|
2007-05-10 21:28:18 +04:00
|
|
|
</table>
|
2008-01-03 01:41:53 +03:00
|
|
|
<%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
|
2007-05-10 21:28:18 +04:00
|
|
|
<% end %>
|