<div id="c-tags">
  <div id="a-index">
    <%= render "search" %>
    <table class="striped">
      <thead>
        <tr>
          <th>Count</th>
          <th>Name</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <% @tags.each do |tag| %>
          <tr>
            <td style="<%= tag_post_count_style(tag) %>"><%= tag.post_count %></td>
            <td class="category-<%= tag.category %>">
              <%= link_to("?", show_or_new_wiki_pages_path(:title => tag.name)) %>
              <%= link_to(tag.name, posts_path(:tags => tag.name)) %>
            </td>
            <td>
              <% if tag.editable_by?(CurrentUser.user) %>
                <%= link_to "edit", edit_tag_path(tag) %>
              <% end %>
              <% if CurrentUser.is_builder? %>
                | <%= link_to "fix", new_tag_correction_path(:tag_id => tag.id) %>
              <% end %>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>

    <%= numbered_paginator(@tags) %>
  </div>
</div>

<%= render "secondary_links" %>

<% content_for(:page_title) do %>
  Tags - <%= Danbooru.config.app_name %>
<% end %>
