summaryrefslogtreecommitdiff
path: root/app/views/revisions/show.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/show.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/show.html.erb')
-rw-r--r--app/views/revisions/show.html.erb88
1 files changed, 47 insertions, 41 deletions
diff --git a/app/views/revisions/show.html.erb b/app/views/revisions/show.html.erb
index ebda18d..154d31b 100644
--- a/app/views/revisions/show.html.erb
+++ b/app/views/revisions/show.html.erb
@@ -1,44 +1,50 @@
1<% content_for :subnavigation do %> 1<% content_for :subnavigation do %>
2 <%= link_to 'Edit', edit_node_path(@node) %> 2 <%= link_to 'show all revisions', node_revisions_path(@node) %>
3<% end %> 3<% end %>
4 4
5<h2>Revisions for Node: <%= @node.unique_name %></h2> 5<div id="page_editor" class="show_node">
6 6 <table id="content">
7<% form_tag diff_revision_path do %> 7 <tr>
8<table id="revisions"> 8 <td class="description">Path</td>
9 <tr class="header"> 9 <td><%= @page.public_link %></td>
10 <th>First</th> 10 </tr>
11 <th>Last</th> 11 <tr>
12 <th>Rev.</th> 12 <td class="description">Author</td>
13 <th>Title</th> 13 <td><%= @page.user.try(:login) %></td>
14 <th>User</th> 14 </tr>
15 <th>Date</th> 15 <% if @page.node.locked? %>
16 <th></th> 16 <tr>
17 </tr> 17 <td class="description">Locked by</td>
18<% @node.pages.reverse.each do |page| %> 18 <td><%= @page.node.lock_owner.login %></td>
19 <tr> 19 </tr>
20 <td><%= radio_button_tag :start_revision, page.revision %></td> 20 <% end %>
21 <td><%= radio_button_tag :end_revision, page.revision %></td> 21 <tr>
22 <td class="revision"><%= page.revision %></td> 22 <td class="description">Last updated</td>
23 <td class="title"><%= page.title %></td> 23 <td><%= @page.updated_at %></td>
24 <td class="user"><%= page.user.try(:login) %></td> 24 </tr>
25 <td class="date"><%= page.updated_at %></td> 25 <tr>
26 <td> 26 <td class="description">Published at</td>
27 <%= link_to 'show', node_path(page.node) %> 27 <td><%= @page.published_at %></td>
28 </td> 28 </tr>
29 <td> 29 <tr>
30 <%= link_to( 30 <td class="description">Revision</td>
31 'restore', 31 <td><%= @page.revision %></td>
32 restore_revision_path(page), 32 </tr>
33 :method => :put, 33 <tr>
34 :confirm => "Restore this revision?" 34 <td class="description"><strong>Title</strong></td>
35 ) %> 35 <td><%= @page.title %></td>
36 </td> 36 </tr>
37 </tr> 37 <tr>
38<% end %> 38 <td class="description"><strong>Abstract</strong></td>
39 <tr class="no_hover"> 39 <td><%= @page.abstract %></td>
40 <td colspan="8" class="right"><%= submit_tag 'Diff revisions' %></td> 40 </tr>
41 </tr> 41 <tr>
42</table> 42 <td class="description"><strong>Body</strong></td>
43 43 <td><%= @page.body %></td>
44<% end %> \ No newline at end of file 44 </tr>
45 <tr>
46 <td></td>
47 <td class="right"></td>
48 </tr>
49 </table>
50</div> \ No newline at end of file