blob: e038ed289e71e13507a5560343e85a14efd86782 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<% content_for :subnavigation do %>
<%= link_to 'Edit', edit_node_path(@node) %>
<% end %>
<h2>Revisions for Node: <%= @node.unique_name %></h2>
<%= form_tag diff_node_revisions_path(@node) do %>
<table id="revisions">
<tr class="header">
<th>First</th>
<th>Last</th>
<th>Rev.</th>
<th>Title</th>
<th>Editor</th>
<th>Date</th>
<th></th>
</tr>
<% (@pages || @node.pages.all).reverse.each do |page| %>
<tr>
<td><%= radio_button_tag :start_revision, page.revision %></td>
<td><%= radio_button_tag :end_revision, page.revision %></td>
<td class="revision"><%= page.revision %></td>
<td class="title"><%= page.title %></td>
<td class="user"><%= page.editor.try(:login) %></td>
<td class="date"><%= page.updated_at %></td>
<td>
<%= link_to 'show', node_revision_path(@node, page) %>
</td>
<td>
<%= link_to(
'restore',
restore_node_revision_path(@node, page),
:method => :put,
:data => { :confirm => "Restore this revision?" }
) %>
</td>
</tr>
<% end %>
<tr class="no_hover">
<td colspan="8" class="right"><%= submit_tag 'Diff revisions' %></td>
</tr>
</table>
<% end %>
|