To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / repositories / _revisions.html.erb @ 912:5e80956cc792
History | View | Annotate | Download (2.41 KB)
| 1 | 909:cbb26bc654de | Chris | <% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
|
|---|---|---|---|
| 2 | 0:513646585e45 | Chris | <% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => to_path_param(path)}, :method => :get) do %>
|
| 3 | <table class="list changesets"> |
||
| 4 | <thead><tr> |
||
| 5 | 909:cbb26bc654de | Chris | <% if show_revision_graph %>
|
| 6 | <th></th> |
||
| 7 | <% end %>
|
||
| 8 | 0:513646585e45 | Chris | <th>#</th> |
| 9 | <th></th> |
||
| 10 | <th></th> |
||
| 11 | <th><%= l(:label_date) %></th> |
||
| 12 | <th><%= l(:field_author) %></th> |
||
| 13 | <th><%= l(:field_comments) %></th> |
||
| 14 | </tr></thead> |
||
| 15 | <tbody>
|
||
| 16 | <% show_diff = revisions.size > 1 %>
|
||
| 17 | <% line_num = 1 %>
|
||
| 18 | <% revisions.each do |changeset| %>
|
||
| 19 | <tr class="changeset <%= cycle 'odd', 'even' %>"> |
||
| 20 | 909:cbb26bc654de | Chris | <% 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 %>
|
||
| 38 | 119:8661b858af72 | Chris | <td class="id"><%= link_to_revision(changeset, project) %></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> |
||
| 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> |
||
| 41 | 0:513646585e45 | Chris | <td class="committed_on"><%= format_time(changeset.committed_on) %></td> |
| 42 | 909:cbb26bc654de | Chris | <td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></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 %>
|
||
| 50 | 0:513646585e45 | Chris | </tr>
|
| 51 | <% line_num += 1 %>
|
||
| 52 | <% end %>
|
||
| 53 | </tbody>
|
||
| 54 | </table>
|
||
| 55 | <%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
|
||
| 56 | <% end %> |