/artists: add URL/Creator/Active/Banned/Has Tag fields to search form.

This commit is contained in:
evazion
2017-04-26 13:15:26 -05:00
parent b61fdc2c6b
commit ec895d6412

View File

@@ -1,5 +1,10 @@
<%= 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 :url_matches, label: "URL", as: "string", input_html: { value: params[:search][:url_matches] } %>
<%= f.input :creator_name, label: "Creator", input_html: { value: params[:search][:creator_name] } %>
<%= f.input :is_active, label: "Active?", collection: [["Yes", true], ["No", false]], include_blank: true, selected: params[:search][:is_active] %>
<%= f.input :is_banned, label: "Banned?", collection: [["Yes", true], ["No", false]], include_blank: true, selected: params[:search][:is_banned] %>
<%= f.input :has_tag, label: "Has tag?", collection: [["Yes", true], ["No", false]], include_blank: true, selected: params[:search][:has_tag] %>
<%= 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 %>