summaryrefslogtreecommitdiff
path: root/app/views/revisions/index.html.erb
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-10-07 23:36:03 +0200
committerhukl <contact@smyck.org>2009-10-07 23:36:03 +0200
commit262f4e0c2abfefbd6965358fdfd9a8c332a38d57 (patch)
tree91055edbbbec337ffd8745239b9d3ccdd8aebb9a /app/views/revisions/index.html.erb
parentd3271f55b56e0fb5f73cf5691f90be9370d85d80 (diff)
refactored revsions controller to act as a nested resource of nodes. boy that cleaned up some stuff quite a bit. also having tests for that is just feeling great
Diffstat (limited to 'app/views/revisions/index.html.erb')
-rw-r--r--app/views/revisions/index.html.erb45
1 files changed, 44 insertions, 1 deletions
diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb
index e3134d7..dbb612b 100644
--- a/app/views/revisions/index.html.erb
+++ b/app/views/revisions/index.html.erb
@@ -1 +1,44 @@
1<h1>Revisions#index</h1> 1<% content_for :subnavigation do %>
2 <%= link_to 'Edit', edit_node_path(@node) %>
3<% end %>
4
5<h2>Revisions for Node: <%= @node.unique_name %></h2>
6
7<% form_tag diff_node_revisions_path(@node) do %>
8<table id="revisions">
9 <tr class="header">
10 <th>First</th>
11 <th>Last</th>
12 <th>Rev.</th>
13 <th>Title</th>
14 <th>User</th>
15 <th>Date</th>
16 <th></th>
17 </tr>
18<% @node.pages.reverse.each do |page| %>
19 <tr>
20 <td><%= radio_button_tag :start_revision, page.revision %></td>
21 <td><%= radio_button_tag :end_revision, page.revision %></td>
22 <td class="revision"><%= page.revision %></td>
23 <td class="title"><%= page.title %></td>
24 <td class="user"><%= page.user.try(:login) %></td>
25 <td class="date"><%= page.updated_at %></td>
26 <td>
27 <%= link_to 'show', node_revision_path(@node, page) %>
28 </td>
29 <td>
30 <%= link_to(
31 'restore',
32 restore_node_revision_path(@node, page),
33 :method => :put,
34 :confirm => "Restore this revision?"
35 ) %>
36 </td>
37 </tr>
38<% end %>
39 <tr class="no_hover">
40 <td colspan="8" class="right"><%= submit_tag 'Diff revisions' %></td>
41 </tr>
42</table>
43
44<% end %> \ No newline at end of file