/artists: convert search form to simple form.
This commit is contained in:
@@ -1,28 +1,5 @@
|
||||
<table class="search">
|
||||
<tbody>
|
||||
<%= form_tag(artists_path, :method => :get, :class => "simple_form") do %>
|
||||
<tr>
|
||||
<th><label for="search_name">Name</label>
|
||||
<td>
|
||||
<div class="input">
|
||||
<%= text_field "search", "name", :value => params[:search][:name] %>
|
||||
<span class="hint">You can search on any name or URL</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><label for="search_order">Order</label>
|
||||
<td>
|
||||
<div class="input">
|
||||
<%= select "search", "order", [["Recently created", "created_at"], ["Last updated", "updated_at"], ["Name", "name"], ["Post count", "post_count"]], :selected => params[:search][:order] %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><%= submit_tag "Search" %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= simple_form_for(:search, url: artists_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
|
||||
<%= f.input :name, label: "Name", hint: "Use * for wildcard", input_html: { value: params[:search][:name] } %>
|
||||
<%= f.input :order, collection: [["Recently created", "created_at"], ["Last updated", "updated_at"], ["Name", "name"], ["Post count", "post_count"]], selected: params[:search][:order] %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user