forgeplus/app/views/admins/video_applies/index.html.erb

32 lines
1.7 KiB
Plaintext

<% define_admin_breadcrumbs do %>
<% add_admin_breadcrumb('视频发布') %>
<% end %>
<div class="box search-form-container flex-column mb-0 pb-0 video-applies-form">
<ul class="nav nav-tabs w-100 search-form-tabs">
<li class="nav-item">
<%= link_to '待审批', admins_video_applies_path(status: :pending), remote: true, 'data-value': 'pending',
class: "nav-link search-form-tab #{params[:status] == 'pending' ? 'active' : ''}" %>
</li>
<li class="nav-item">
<%= link_to '已审批', admins_video_applies_path(status: "all"), remote: true, 'data-value': 'all',
class: "nav-link search-form-tab #{params[:status] != 'pending' ? 'active' : ''}" %>
</li>
</ul>
<%= form_tag(admins_video_applies_path(unsafe_params), method: :get, class: 'form-inline search-form justify-content-end mt-3', remote: true) do %>
<div class="form-group status-filter" style="<%= params[:status] != 'pending' ? '' : 'display: none;' %>">
<label for="status">审核状态:</label>
<% status_options = [['全部', 'all'], ['已同意', 'agreed'], ['已拒绝', 'refused']] %>
<%= select_tag(:status, options_for_select(status_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', 'data-disable-with': '搜索中...') %>
<% end %>
</div>
<div class="box admin-list-container video-applies-list-container">
<%= render(partial: 'admins/video_applies/shared/list', locals: { applies: @video_applies}) %>
</div>
<%= render(partial: 'admins/shared/admin_common_refuse_modal') %>