/tags: add history, related, similar links.

This commit is contained in:
evazion
2019-09-26 21:50:29 -05:00
parent 2b4ee0ee8f
commit 97e0c16af6
2 changed files with 7 additions and 12 deletions

View File

@@ -1,14 +1,8 @@
div#c-tags { div#c-tags {
div#a-index table.striped { div#a-index table.striped {
td:nth-child(1), th:nth-child(1) { td:nth-child(1), th:nth-child(1) {
width: 5em;
text-align: right; text-align: right;
} }
td:nth-child(2), th:nth-child(2) {
padding-left: 1em;
width: 40em;
}
} }
} }

View File

@@ -1,7 +1,7 @@
<div id="c-tags"> <div id="c-tags">
<div id="a-index"> <div id="a-index" class="fixed-width-container">
<%= render "search" %> <%= render "search" %>
<table class="striped"> <table class="striped autofit">
<thead> <thead>
<tr> <tr>
<th>Count</th> <th>Count</th>
@@ -13,14 +13,15 @@
<% @tags.each do |tag| %> <% @tags.each do |tag| %>
<tr> <tr>
<td><%= tag.post_count %></td> <td><%= tag.post_count %></td>
<td class="category-<%= tag.category %>"> <td class="category-<%= tag.category %> col-expand">
<%= link_to("?", show_or_new_wiki_pages_path(:title => tag.name)) %> <%= link_to("?", show_or_new_wiki_pages_path(:title => tag.name)) %>
<%= link_to(tag.name, posts_path(:tags => tag.name)) %> <%= link_to(tag.name, posts_path(:tags => tag.name)) %>
</td> </td>
<td> <td>
<% if tag.editable_by?(CurrentUser.user) %> <%= link_to_if tag.editable_by?(CurrentUser.user), "edit", edit_tag_path(tag) %> |
<%= link_to "edit", edit_tag_path(tag) %> <%= link_to "history", post_versions_path(search: { changed_tags: tag.name }) %> |
<% end %> <%= link_to "related", related_tag_path(search: { query: tag.name }) %> |
<%= link_to "similar", tags_path(search: { fuzzy_name_matches: tag.name, order: :similarity }) %>
</td> </td>
</tr> </tr>
<% end %> <% end %>