<div id="c-tag-aliases">
  <div id="a-index">
    <%= simple_form_for(:search, method: :get, url: tag_aliases_path, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
      <%= f.input :name_matches, label: "Name", input_html: { value: params[:search][:name_matches], data: { autocomplete: "tag" } } %>
      <%= f.input :status, label: "Status", collection: ["", "Approved", "Pending"], selected: params[:search][:status] %>
      <%= f.input :category, label: "Category", collection: Danbooru.config.canonical_tag_category_mapping.to_a, include_blank: true, selected: params[:search][:category] %>
      <%= f.input :order, label: "Order", collection: [%w[Status status], %w[Recently\ created created_at], %w[Recently\ updated updated_at], %w[Name name], %w[Tag\ count tag_count]], selected: params[:search][:order] %>
      <%= f.submit "Search" %>
    <% end %>

    <%= render "listing", :tag_aliases => @tag_aliases %>

    <%= numbered_paginator(@tag_aliases) if @tag_aliases.respond_to?(:current_page) %>
  </div>
</div>

<%= render "tag_aliases/secondary_links" %>

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