* Refactored post history. Each post now has a single history record. This history record has multiple revisions, serialized as JSON in a text field.

This commit is contained in:
albert
2010-11-06 03:08:27 -04:00
parent 6076788d60
commit f3b4312ef3
11 changed files with 190 additions and 19 deletions

View File

@@ -0,0 +1,35 @@
<div class="post_histories">
<div class="index">
<h1>Post History</h1>
<% @histories.each do |history| %>
<div class="post">
<div class="preview">
<%= history.post.presenter.preview_html %>
</div>
<div class="history">
<table>
<thead>
<tr>
<th>Changes</th>
<th>Date</th>
<th>Updater</th>
</tr>
</thead>
<tbody>
<% history.each_revision do |revision| %>
<tr>
<td><%= revision.presenter.changes %></td>
<td><%= revision.presenter.updated_at %></td>
<td><%= revision.presenter.updater_name %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<% end %>
</div>
</div>