You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/admins/shixun_settings/index.html.erb

77 lines
3.6 KiB

5 years ago
<% define_admin_breadcrumbs do %>
<% add_admin_breadcrumb('实训配置', admins_shixun_settings_path) %>
<% end %>
<div class="box search-form-container shixun-settings-list-form">
<%= form_tag(admins_shixun_settings_path, method: :get, class: 'form-inline search-form', remote: true) do %>
<div class="d-flex flex-column w-100">
5 years ago
<div class="d-flex position-r">
5 years ago
<div class="form-group mr-2">
<label for="status">状态:</label>
<% status_options = [['全部', ''], ["编辑中(#{@editing_shixuns})", "editing"], ["待审核(#{@pending_shixuns})", 'pending'], ["已发布(#{@processed_shixuns})", 'processed'],["已关闭(#{@closed_shixuns})",'closed']] %>
<%= select_tag(:status, options_for_select(status_options), class: 'form-control') %>
</div>
<div class="form-group mr-2">
<label for="tag-choosed">技术平台:</label>
<%= select_tag(:tag, options_for_select(@shixuns_type_check.unshift(["",nil])), class: 'form-control',id:"tag-choosed") %>
</div>
<div class="form-group mr-2">
<label>搜索类型:</label>
<% auto_trial_options = [['创建者姓名', 0], ['实训名称', 1], ['学校名称', 2]] %>
<%= select_tag(:search_type, options_for_select(auto_trial_options), class: 'form-control') %>
</div>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '输入关键字搜索') %>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3') %>
<%= link_to "清除",admins_shixun_settings_path(status:nil,tag:nil,search_type:nil,keyword:nil),class: "btn btn-default" %>
<div class="">
5 years ago
<a href="<%= admins_shixun_settings_path( :format => "xls") %>" class="btn btn-primary export-absolute" id="shixun_xls">导出</a>
5 years ago
</div>
</div>
5 years ago
<div class="d-flex mt-3">
<div class="mr-5">
<label for="can_copy">
<%= check_box_tag :can_copy,true,false,remote:true,class:"shixun-settings-select" %>
5 years ago
<span class="only_view">只看可复制</span>
</label>
</div>
<div class="mr-5">
<label for="webssh">
<%= check_box_tag :webssh,1,false,remote:true, class:"shixun-settings-select" %>
5 years ago
<span class="only_view">只看可ssh</span>
</label>
</div>
<div class="mr-5">
<label for="hidden">
<%= check_box_tag :hidden,true,false,remote:true, class:"shixun-settings-select" %>
5 years ago
<span class="only_view">只看已隐藏</span>
</label>
</div>
<div class="mr-5">
<label for="homepage_show">
<%= check_box_tag :homepage_show,true,false,remote:true, class:"shixun-settings-select" %>
5 years ago
<span class="only_view">只看首页显示</span>
</label>
</div>
<div class="mr-5">
<label for="task_pass">
<%= check_box_tag :task_pass, true, false, remote:true, class:"shixun-settings-select" %>
5 years ago
<span class="only_view">只看可跳关</span>
</label>
</div>
<div class="mr-5">
<label for="code_hidden">
<%= check_box_tag :code_hidden, true, false, remote:true, class:"shixun-settings-select" %>
5 years ago
<span class="only_view">只看已隐藏文件目录</span>
</label>
</div>
5 years ago
</div>
</div>
<% end %>
</div>
<div class="box shixun-settings-list-container">
5 years ago
<%= render partial: 'admins/shixun_settings/shared/list', locals: { shixun_settings: @shixun_settings } %>
5 years ago
</div>