/bulk_update_requests: add search form.

This commit is contained in:
evazion
2017-05-14 12:47:57 -05:00
parent f510a0d9d2
commit 614bf44086
5 changed files with 67 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
<%= simple_form_for(:search, url: bulk_update_requests_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
<%= f.input :user_name, label: "Creator", input_html: { value: params[:search][:user_name] } %>
<%= f.input :approver_name, label: "Approver", input_html: { value: params[:search][:approver_name] } %>
<%= f.input :status, label: "Status", collection: %w[pending approved rejected], include_blank: true, selected: params[:search][:status] %>
<%= f.input :order, collection: [%w[Status status_desc], %w[Last\ updated updated_at_desc], %w[Newest id_desc], %w[Oldest id_asc]], include_blank: false, selected: params[:search][:order] %>
<%= f.submit "Search" %>
<% end %>

View File

@@ -2,6 +2,7 @@
<div id="a-index">
<h1>Bulk Update Requests</h1>
<%= render "search" %>
<%= render "listing", :bulk_update_requests => @bulk_update_requests %>
<%= numbered_paginator(@bulk_update_requests) %>