* Reworked how post versioning works, now more closely resembles the 1.18 strategy
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
<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 class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Updater</th>
|
||||
<th>Changes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% history.each_revision do |revision| %>
|
||||
<tr>
|
||||
<td><%= revision.presenter.updated_at %></td>
|
||||
<td><%= revision.presenter.updater_name %></td>
|
||||
<td><%= revision.presenter.changes %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
25
app/views/post_versions/index.html.erb
Normal file
25
app/views/post_versions/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="post_versions">
|
||||
<div class="index">
|
||||
<h1>Post Versions</h1>
|
||||
|
||||
<table class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Updater</th>
|
||||
<th>Changes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @post_versions.each do |post_version| %>
|
||||
<tr>
|
||||
<td><%= time_ago_in_words post_version.updated_at %></td>
|
||||
<td><%= post_version.presenter.updater_name %></td>
|
||||
<td><%= post_version.presenter.changes %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user