summaryrefslogtreecommitdiff
path: root/app/views/revisions/show.html.erb
blob: 3e7ce091f187a7604769f167457ad5aba1a1f2e3 (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
<% content_for :subnavigation do %>
  <%= link_to 'Edit',     edit_node_path(@node) %>
<% end %>

<h2>Revisions for Node: <%= @node.unique_name %></h2>

<% form_tag diff_revision_path do %>
<table id="revisions">
  <tr class="header">
    <th>First</th>
    <th>Last</th>
    <th>Rev.</th>
    <th>Title</th>
    <th>User</th>
    <th>Date</th>
  </tr>
<% @node.pages.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.user.try(:login)  %></td>
    <td class="date"><%= page.updated_at %></td>
  </tr>
<% end %>
  <tr>
    <td colspan="6" class="right"><%= submit_tag 'Diff revisions' %></td>
  </tr>
</table>

<% end %>