<table class="table table-hover text-center school-base-statistic-list-table">
  <thead class="thead-light">
  <tr>
    <th width="4%">序号</th>
    <th width="10%" class="text-left">单位名称</th>
    <th width="8%"><%= sort_tag('注册教师', name: 'teacher_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('注册学生', name: 'student_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('教学课堂', name: 'course_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('管理分班', name: 'course_group_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('课件资源', name: 'attachment_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('教学视频', name: 'video_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('普通作业', name: 'normal_work_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('实训作业', name: 'shixun_work_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('作业文件', name: 'student_work_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('评测次数', name: 'shixun_evaluate_count', path: admins_school_base_statistics_path) %></th>
    <th width="8%"><%= sort_tag('在线试卷', name: 'exercise_count', path: admins_school_base_statistics_path) %></th>
  </tr>
  </thead>
  <tbody>
  <% if statistics.present? %>
    <% statistics.each_with_index do |statistic, index| %>
      <tr>
        <td><%= list_index_no(@params_page.to_i, index) %></td>
        <td class="text-left">
          <%= link_to statistic[:name], "/colleges/#{statistic[:id]}/statistics",
                      target: '_blank', data: { toggle: 'tooltip', title: '点击查看学校统计概况' } %>
        </td>
        <td><%= statistic[:teacher_count].to_i %></td>
        <td><%= statistic[:student_count].to_i %></td>
        <td><%= statistic[:course_count].to_i %></td>
        <td><%= statistic[:course_group_count].to_i %></td>
        <td><%= statistic[:attachment_count].to_i %></td>
        <td><%= statistic[:video_count].to_i %></td>
        <td><%= statistic[:normal_work_count].to_i %></td>
        <td><%= statistic[:shixun_work_count].to_i %></td>
        <td><%= statistic[:student_work_count].to_i %></td>
        <td><%= statistic[:shixun_evaluate_count].to_i %></td>
        <td><%= statistic[:exercise_count].to_i %></td>
              
      </tr>
    <% end %>
  <% else %>
    <%= render 'admins/shared/no_data_for_table' %>
  <% end %>
  </tbody>
</table>

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