<% define_admin_breadcrumbs do %> <% add_admin_breadcrumb('课程配置') %> <% end %>
<%= form_tag(admins_subject_settings_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
<% status_options = [['全部', ''], ['编辑中', 'pending'], ['审核中', 'applying'], ['已公开', 'published']] %> <%= 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/subject_settings/shared/list', locals: { subjects: @subjects } %>
<%= render partial: 'admins/shared/modal/upload_file_modal', locals: { title: '上传图片', accept: 'image/*' } %>