<table class="search">
  <tbody>
    <%= form_tag 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] %>
          </div>
        </td>
      </tr>

      <tr>
        <th><label for="search_description_matches">Description</label></th>
        <td>
          <div class="input">
            <%= text_field "search", "description_matches", :value => params[:search][:description_matches] %>
          </div>
        </td>
      </tr>

      <tr>
        <th><label for="search_creator_name">Creator</th>
        <td>
          <div class="input">
            <%= text_field "search", "creator_name", :value => params[:search][:creator_name] %>
          </div>
        </td>
      </tr>

      <tr>
        <th><label for="search_is_active">Status</th>
        <td>
          <div class="input">
            <%= select "search", "is_active", ["", ["Active", "true"], ["Inactive", "false"]], :selected => params[:search][:is_active] %>
          </div>
        </td>
      </tr>

      <% if path != gallery_pools_path %>
        <tr>
          <th><label for="search_category">Category</th>
          <td>
            <div class="input">
              <%= select "search", "category", [["Series", "series"], ["Collection", "collection"]], :selected => params[:search][:category], :include_blank => true %>
            </div>
          </td>
        </tr>
      <% end %>

      <tr>
        <th><label for="search_order">Order</th>
        <td>
          <div class="input">
            <%= select "search", "order", [["Last updated", "updated_at"], ["Name", "name"], ["Recently created", "created_at"], ["Post count", "post_count"]], :selected => params[:search][:order] %>
          </div>
        </td>
      </tr>

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