2007-05-10 21:28:18 +04:00
|
|
|
<% form_tag({:controller => 'repositories', :action => 'diff', :id => @project}, :method => :get) do %>
|
2007-03-25 16:12:15 +04:00
|
|
|
<table class="list">
|
|
|
|
<thead><tr>
|
|
|
|
<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>
|
2007-06-13 00:12:05 +04:00
|
|
|
<% show_diff = entry && entry.is_file? && revisions.size > 1 %>
|
2007-05-10 21:28:18 +04:00
|
|
|
<% line_num = 1 %>
|
2007-06-13 00:12:05 +04:00
|
|
|
<% revisions.each do |revision| %>
|
|
|
|
<% changeset = revision.is_a?(Change) ? revision.changeset : revision %>
|
2007-03-25 16:12:15 +04:00
|
|
|
<tr class="<%= cycle 'odd', 'even' %>">
|
2007-06-13 00:12:05 +04:00
|
|
|
<th align="center" style="width:3em;"><%= link_to (revision.revision || changeset.revision), :action => 'revision', :id => project, :rev => changeset.revision %></th>
|
|
|
|
<td align="center" style="width:1em;"><%= radio_button_tag('rev', changeset.revision, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %></td>
|
2007-05-10 21:36:45 +04:00
|
|
|
<td align="center" style="width:1em;"><%= radio_button_tag('rev_to', changeset.revision, (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>
|
2007-04-03 23:16:09 +04:00
|
|
|
<td align="center" style="width:15%"><%= format_time(changeset.committed_on) %></td>
|
|
|
|
<td align="center" style="width:15%"><em><%=h changeset.committer %></em></td>
|
2007-04-25 19:06:20 +04:00
|
|
|
<td align="left"><%= textilizable(changeset.comments) %></td>
|
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>
|
|
|
|
<%= hidden_field_tag 'path', path %>
|
|
|
|
<%= submit_tag(l(:label_view_diff), :class => 'small', :name => nil) if show_diff %>
|
|
|
|
<% end %>
|