refactored search

This commit is contained in:
albert
2013-01-10 17:45:52 -05:00
parent 13271e9bf5
commit 8749c43b3e
85 changed files with 946 additions and 304 deletions

View File

@@ -15,7 +15,7 @@
<li><%= link_to "Delete", pool_path(@pool), :method => :delete, :confirm => "Are you sure you want to delete this pool?", :remote => true %></li>
<% end %>
<% end %>
<li><%= link_to "History", pool_versions_path(:search => {:pool_id_eq => @pool.id}) %></li>
<li><%= link_to "History", pool_versions_path(:search => {:pool_id => @pool.id}) %></li>
<li><%= link_to "Order", edit_pool_order_path(@pool) %></li>
<% end %>
</menu>

View File

@@ -1,9 +1,10 @@
<div id="c-pools">
<div id="a-search">
<%= simple_form_for @search, :method => :get do |f| %>
<%= f.input :name_contains, :label => "Name", :required => false %>
<%= f.input :description_contains, :label => "Description", :required => false %>
<%= f.button :submit, "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" %>
<%= submit_tag "Search" %>
<% end %>
</div>
</div>