/post_versions: add search form, tweak layout.

* Add search form above table.
* Move thumbnail to left of table when viewing history of single post.
* Remove unrelated links from subnav menu.
* Fix bugs with changed_tags search.
This commit is contained in:
evazion
2019-09-28 23:16:50 -05:00
parent e3b49a2a6d
commit dade1e67b0
6 changed files with 30 additions and 11 deletions

View File

@@ -1,5 +1,9 @@
<div id="p-<%= post_version_listing %>-listing">
<table class="striped autofit">
<% if post_version_listing == :revert %>
<%= PostPresenter.preview(@post_versions.first.post, show_deleted: true) %>
<% end %>
<table id="post-versions-table" class="striped autofit">
<thead>
<tr>
<% if CurrentUser.user.is_builder? %>
@@ -33,7 +37,7 @@
<td class="col-expand"><%= post_version_diff(post_version) %></td>
<td>
<%= link_to_user post_version.updater %>
<%= link_to "»", post_versions_path(search: { updater_name: post_version.updater&.name }) %>
<%= link_to "»", post_versions_path(search: params[:search].merge({ updater_name: post_version.updater&.name })) %>
<div>
<%= compact_time(post_version.updated_at) %>
<% if CurrentUser.is_moderator? %>