<table class="search">
  <tbody>
    <%= form_tag(tags_path, :method => :get, :class => "simple_form") do %>
      <tr>
        <th><label for="search_name_matches">Name</label></th>
        <td>
          <div class="input">
            <%= text_field "search", "name_matches", :value => params[:search][:name_matches] %>
            <span class="hint">Use * for wildcard</span>
          </div>
        </td>
      </tr>

      <tr>
        <th><label for="search_category">Category</label></th>
        <td>
          <div class="input">
            <%= select "search", "category", [""] + Danbooru.config.canonical_tag_category_mapping.to_a, :selected => params[:search][:category] %>
          </div>
        </td>
      </tr>

      <tr>
        <th><label for="search_order">Order</label></th>
        <td>
          <div class="input">
            <%= select "search", "order", %w(count date name), :selected => params[:search][:order] %>
          </div>
        </td>
      </tr>

      <tr>
        <th><label for="search_hide_empty">Hide Empty</label></th>
        <td>
          <div class="input">
            <%= select "search", "hide_empty", ["yes", "no"], :selected => params[:search][:hide_empty] %>
          </div>
        </td>
      </tr>

      <tr>
        <td><%= submit_tag "Search" %><td>
      </tr>
    <% end %>
  </tbody>
</table>
