<% define_admin_breadcrumbs do %> <% add_admin_breadcrumb('课程列表') %> <% end %>
<%= form_tag(admins_subjects_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
<% status_options = [['全部', ''], ["编辑中", "editing"], ["已发布", 'processed'], ["待审核", 'pending'], ["已公开", 'publiced']] %> <%= select_tag(:status, options_for_select(status_options), class: 'form-control') %>
<%= select_tag :school_id, options_for_select([''], params[:school_id]), class: 'form-control school-select flex-1' %>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-12 col-md-2 mr-3', placeholder: '创建者/课程名称检索') %>
<%= hidden_field_tag(:homepage_show, false, id:'') %> <%= check_box_tag(:homepage_show, true, params[:homepage_show].to_s == 'true', class: 'form-check-input') %>
<%= hidden_field_tag(:excellent, false, id:'') %> <%= check_box_tag(:excellent, true, params[:excellent].to_s == 'true', class: 'form-check-input') %>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %> <% end %>
<%= render partial: 'admins/subjects/shared/list', locals: { subjects: @subjects } %>