<table class="table table-hover text-center user-statistic-list-table">
  <thead class="thead-light">
  <tr>
    <th width="6%">序号</th>
    <th width="22%" class="text-left">单位名称</th>
    <th width="8%" class="text-left">省份</th>
    <th width="10%">注册老师数量<%#= sort_tag('学习关卡数', name: 'study_challenge_count', path: admins_user_statistics_path) %></th>
    <th width="10%">注册学生数量<%#= sort_tag('完成关卡数', name: 'finish_challenge_count', path: admins_user_statistics_path) %></th>
    <th width="10%">活跃用户<%#= sort_tag('活跃用户', name: 'user_active_count', path: admins_user_schools_statistics_path) %></th>
    <th width="10%">学习关卡数<%#= sort_tag('学习关卡数', name: 'finish_shixun_count', path: admins_user_schools_statistics_path) %></th>
    <th width="10%">完成关卡数</th>
    <th width="14%">评测次数</th>
  </tr>
  </thead>
  <tbody>
  <% if schools.present? %>
    <% schools.each_with_index do |school, index| %>
      <tr class="user-statistic-item-<%= school.id %>">
        <td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
        <td class="text-left">
          <%= school.name %>
        </td>
        <td class="text-left"><%= school.province %></td>
        <td><%= school.display_extra_data(:reg_teacher_count) %></td>
        <td><%= school.display_extra_data(:reg_student_count) %></td>
        <td><%= school.display_extra_data(:user_active_count) %></td>
        <td><%= school.display_extra_data(:study_challenge_count) %></td>
        <td><%= school.display_extra_data(:finish_challenge_count) %></td>
        <td><%= school.display_extra_data(:evaluate_count) %></td>
      </tr>
    <% end %>
  <% else %>
    <%= render 'admins/shared/no_data_for_table' %>
  <% end %>
  </tbody>
</table>

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