diff --git a/app/views/bans/_search.html.erb b/app/views/bans/_search.html.erb new file mode 100644 index 000000000..8d7068d70 --- /dev/null +++ b/app/views/bans/_search.html.erb @@ -0,0 +1,8 @@ +<%= simple_form_for(:search, method: :get, url: bans_path, defaults: { required: false }, html: { class: "inline-form" }) do |f| %> + <%= f.input :user_name, label: "User", input_html: { value: params[:search][:user_name] } %> + <%= f.input :banner_name, label: "Banner", input_html: { value: params[:search][:banner_name] } %> + <%= f.input :reason_matches, label: "Reason", hint: "Use * for wildcard", input_html: { value: params[:search][:reason_matches] } %> + <%= f.input :expired, label: "Expired?", collection: [["Yes", true], ["No", false]], include_blank: true, selected: params[:search][:expired] %> + <%= f.input :order, include_blank: false, collection: [%w[Created id_desc], %w[Expiration expires_at_desc]], selected: params[:search][:order] %> + <%= f.submit "Search" %> +<% end %> diff --git a/app/views/bans/index.html.erb b/app/views/bans/index.html.erb index 5db68240c..d98afeabf 100644 --- a/app/views/bans/index.html.erb +++ b/app/views/bans/index.html.erb @@ -2,6 +2,8 @@