Combine version partials into one file
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div id="p-<%= post_version_listing %>-listing">
|
||||
<% if post_version_listing == :revert %>
|
||||
<div id="p-<%= post_versions_listing_type %>-listing">
|
||||
<% if post_versions_listing_type == :revert %>
|
||||
<%= PostPresenter.preview(@post_versions.first.post, show_deleted: true) %>
|
||||
<% end %>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<input type="checkbox" class="post-version-select-checkbox" <%= "disabled" unless post_version.can_undo?(CurrentUser.user) %>>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if post_version_listing == :standard %>
|
||||
<% if post_versions_listing_type == :standard %>
|
||||
<% t.column "Post" do |post_version| %>
|
||||
<%= PostPresenter.preview(post_version.post, show_deleted: true) %>
|
||||
<% end %>
|
||||
@@ -34,7 +34,7 @@
|
||||
<% if post_version.can_undo?(CurrentUser.user) %>
|
||||
<%= link_to "Undo", undo_post_version_path(post_version), method: :put, remote: true, class: "post-version-undo-link" %>
|
||||
<% end %>
|
||||
<% if post_version_listing == :revert && post_version.can_revert_to?(CurrentUser.user) %>
|
||||
<% if post_versions_listing_type == :revert && post_version.can_revert_to?(CurrentUser.user) %>
|
||||
| <%= link_to "Revert to", revert_post_path(post_version.post_id, version_id: post_version.id), method: :put, remote: true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-post-versions">
|
||||
<div id="a-index">
|
||||
<% if post_version_listing == :revert && @post_versions.present? %>
|
||||
<% if post_versions_listing_type == :revert && @post_versions.present? %>
|
||||
<h1>Tag History: <%= link_to "Post ##{params.dig(:search, :post_id)}", @post_versions[0].post %></h1>
|
||||
<% else %>
|
||||
<h1>Tag History</h1>
|
||||
|
||||
Reference in New Issue
Block a user