<% define_admin_breadcrumbs do %>
  <% add_admin_breadcrumb('试题列表') %>
<% end %>

<div class="box search-form-container hacks-list-form">
  <%= form_tag(admins_hacks_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
    <div class="form-group mr-1">
      <label for="status">状态：</label>
      <% status_options = [['全部', ''], ["已发布", true], ["未发布", false]] %>
      <%= select_tag(:public, options_for_select(status_options), class: 'form-control') %>
    </div>

    <%= text_field_tag(:sub, params[:sub], class: 'form-control col-12 col-md-2 mr-3', placeholder: '课程名称') %>
    <%= text_field_tag(:name, params[:name], class: 'form-control col-12 col-md-2 mr-3', placeholder: '题目名称') %>
    <%= text_field_tag(:user, params[:user], class: 'form-control col-12 col-md-2 mr-3', placeholder: '用户名') %>

    <%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
  <% end %>

</div>

<div class="box admin-list-container hacks-list-container">
  <%= render partial: 'admins/hacks/shared/list', locals: { item_banks: @item_banks } %>
</div>