post versions: add ability to search post versions by tags.

* Add ability to search /post_versions by added tags, removed tags, or
  changed tags (added or removed).

* Add 'History' link to the sidebar of the /posts index. This is a
  shortcut for a /post_versions search of the current tag.
This commit is contained in:
evazion
2019-09-26 20:28:30 -05:00
parent 12de26d2cf
commit 2b4ee0ee8f
7 changed files with 56 additions and 16 deletions

View File

@@ -13,9 +13,10 @@
<% end %>
<li><%= link_to "Deleted", posts_path(:tags => "#{params[:tags]} status:deleted"), :rel => "nofollow" %></li>
<li><%= link_to "Random", random_posts_path(:tags => params[:tags]), :id => "random-post", :rel => "nofollow", :"data-shortcut" => "r" %></li>
<% if Tag.is_simple_tag?(params[:tags]) %>
<li><%= link_to "History", post_versions_path(search: { changed_tags: params[:tags] }) %></li>
<% end %>
<li><%= link_to "Count", posts_counts_path(:tags => params[:tags]) %></li>
</ul>
</section>