views: convert /tags to table builder.
This commit is contained in:
@@ -1,32 +1,20 @@
|
|||||||
<div id="c-tags">
|
<div id="c-tags">
|
||||||
<div id="a-index" class="fixed-width-container">
|
<div id="a-index" class="fixed-width-container">
|
||||||
<%= render "search" %>
|
<%= render "search" %>
|
||||||
<table class="striped autofit">
|
|
||||||
<thead>
|
<%= table_for @tags, class: "striped autofit" do |t| %>
|
||||||
<tr>
|
<% t.column :post_count, name: "Count" %>
|
||||||
<th>Count</th>
|
<% t.column :name, class: "col-expand" do |tag| %>
|
||||||
<th>Name</th>
|
<%= link_to_wiki "?", tag.name, class: "tag-type-#{tag.category}" %>
|
||||||
<th></th>
|
<%= link_to tag.name, posts_path(tags: tag.name), class: "tag-type-#{tag.category}" %>
|
||||||
</tr>
|
<% end %>
|
||||||
</thead>
|
<% t.column do |tag| %>
|
||||||
<tbody>
|
<%= link_to_if tag.editable_by?(CurrentUser.user), "Edit", edit_tag_path(tag) %> |
|
||||||
<% @tags.each do |tag| %>
|
<%= link_to "History", post_versions_path(search: { changed_tags: tag.name }) %> |
|
||||||
<tr>
|
<%= link_to "Related", related_tag_path(search: { query: tag.name }) %> |
|
||||||
<td><%= tag.post_count %></td>
|
<%= link_to "Similar", tags_path(search: { fuzzy_name_matches: tag.name, order: :similarity }) %>
|
||||||
<td class="category-<%= tag.category %> col-expand">
|
<% end %>
|
||||||
<%= link_to_wiki "?", tag.name %>
|
<% end %>
|
||||||
<%= link_to(tag.name, posts_path(:tags => tag.name)) %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= link_to_if tag.editable_by?(CurrentUser.user), "edit", edit_tag_path(tag) %> |
|
|
||||||
<%= link_to "history", post_versions_path(search: { changed_tags: tag.name }) %> |
|
|
||||||
<%= link_to "related", related_tag_path(search: { query: tag.name }) %> |
|
|
||||||
<%= link_to "similar", tags_path(search: { fuzzy_name_matches: tag.name, order: :similarity }) %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<%= numbered_paginator(@tags) %>
|
<%= numbered_paginator(@tags) %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user