<table class="table table-hover text-center hack-list-table">
  <thead class="thead-light">
  <tr>
    <th width="4%">序号</th>
    <th width="4%"><%= sort_tag('ID', name: 'id', path: admins_hacks_path) %></th>
    <th width="6%" class="text-left">课程名称</th>
    <th width="6%">编程语言</th>
    <th width="10%" class="text-left">试题名称</th>
    <th width="10%" class="text-left">试题状态</th>
    <th width="10%">难度</th>
    <th width="10%">挑战人数</th>
    <th width="10%">通过率</th>
    <th width="10%">评测次数</th>
    <th width="10%">创建者</th>
    <th width="10%"><%= sort_tag('创建时间', name: 'created_at', path: admins_hacks_path) %></th>
  </tr>
  </thead>
  <tbody>
  <% if item_banks.present? %>
    <% item_banks.each_with_index do |item_bank, index| %>
      <tr class="hack-item-<%= item_bank.id %>">
        <%= render partial: 'admins/hacks/shared/td', locals: {item_bank: item_bank, no: index} %>
      </tr>
    <% end %>
  <% else %>
    <%= render 'admins/shared/no_data_for_table' %>
  <% end %>
  </tbody>
</table>

<%= render partial: 'admins/shared/paginate', locals: { objects: item_banks } %>