move pool search to index (#636)
This commit is contained in:
45
app/views/pools/_search.html.erb
Normal file
45
app/views/pools/_search.html.erb
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<table class="search">
|
||||||
|
<tbody>
|
||||||
|
<%= form_tag pools_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" %>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th><label for="search_description_matches">Description</label></th>
|
||||||
|
<td>
|
||||||
|
<div class="input">
|
||||||
|
<%= text_field "search", "description_matches" %>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th><label for="search_creator_name">Creator</th>
|
||||||
|
<td>
|
||||||
|
<div class="input">
|
||||||
|
<%= text_field "search", "creator_name" %>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th><label for="search_sort">Order</th>
|
||||||
|
<td>
|
||||||
|
<div class="input">
|
||||||
|
<%= select "search", "sort", [["Last updated", "updated_at"], ["Name", "name"]] %>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><%= submit_tag "Search" %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
<menu>
|
<menu>
|
||||||
<li><%= render "pools/quick_search" %></li>
|
<li><%= render "pools/quick_search" %></li>
|
||||||
<li><%= link_to "Listing", pools_path %></li>
|
<li><%= link_to "Listing", pools_path %></li>
|
||||||
<li><%= link_to "Search", search_pools_path %></li>
|
|
||||||
<li><%= link_to "New", new_pool_path %></li>
|
<li><%= link_to "New", new_pool_path %></li>
|
||||||
<% if CurrentUser.is_member? && @pool && !@pool.new_record? %>
|
<% if CurrentUser.is_member? && @pool && !@pool.new_record? %>
|
||||||
<li>|</li>
|
<li>|</li>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<div id="c-pools">
|
<div id="c-pools">
|
||||||
<div id="a-index">
|
<div id="a-index">
|
||||||
|
<%= render "search" %>
|
||||||
<table class="striped" width="100%">
|
<table class="striped" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<div id="c-pools">
|
|
||||||
<div id="a-search">
|
|
||||||
<%= form_tag pools_path, :method => :get, :class => "simple_form" do %>
|
|
||||||
<%= search_field "name_matches", :label => "Name" %>
|
|
||||||
<%= search_field "description_matches", :label => "Description" %>
|
|
||||||
<%= search_field "creator_name", :label => "Creator" %>
|
|
||||||
|
|
||||||
<div class="input">
|
|
||||||
<label>Order</label>
|
|
||||||
<%= select "search", "sort", [["Last updated", "updated_at"], ["Name", "name"]] %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= submit_tag "Search" %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= render "secondary_links" %>
|
|
||||||
|
|
||||||
<% content_for(:page_title) do %>
|
|
||||||
Search Pools - <%= Danbooru.config.app_name %>
|
|
||||||
<% end %>
|
|
||||||
@@ -122,9 +122,6 @@ Danbooru::Application.routes.draw do
|
|||||||
end
|
end
|
||||||
resources :note_versions, :only => [:index]
|
resources :note_versions, :only => [:index]
|
||||||
resources :pools do
|
resources :pools do
|
||||||
collection do
|
|
||||||
get :search
|
|
||||||
end
|
|
||||||
member do
|
member do
|
||||||
put :revert
|
put :revert
|
||||||
post :undelete
|
post :undelete
|
||||||
|
|||||||
Reference in New Issue
Block a user