<table class="table table-hover text-center subject-list-table">
    <thead class="thead-light">
    <tr>
      <th width="20%">排名</th>
      <th width="30%">项目</th>
      <th width="10%">得分</th>
      <th width="10%"><%= sort_tag('访问数', name: 'visits', path: admins_projects_rank_index_path) %></th>
      <th width="10%"><%= sort_tag('关注数', name: 'watchers', path: admins_projects_rank_index_path) %></th>
      <th width="10%"><%= sort_tag('点赞数', name: 'praises', path: admins_projects_rank_index_path) %></th>
      <th width="10%"><%= sort_tag('fork数', name: 'forks', path: admins_projects_rank_index_path) %></th>
      <th width="10%"><%= sort_tag('疑修数', name: 'issues', path: admins_projects_rank_index_path) %></th>
      <th width="10%"><%= sort_tag('合并请求数', name: 'pullrequests', path: admins_projects_rank_index_path) %></th>
      <th width="10%"><%= sort_tag('提交数', name: 'commits', path: admins_projects_rank_index_path) %></th>
    </tr>
    </thead>
    <tbody>
      <% statistics.each_with_index do |item, index| %>
        <tr class="">
          <td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
          <td>
            <a target="_blank" href="<%= "/#{item&.project&.owner&.login}/#{item&.project&.identifier}"%>">
              <%= "#{item&.project&.owner&.real_name}/#{item&.project&.name}" %>
            </a>
          </td>
        
          <td><%= item&.score %></td>
          <td><%= item&.visits %></td>
          <td><%= item&.watchers %></td>
          <td><%= item&.praises %></td>
          <td><%= item&.forks %></td>
          <td><%= item&.issues %></td>
          <td><%= item&.pullrequests %></td>
          <td><%= item&.commits %></td>
        </tr>
      <% end %>
    </tbody>
  </table>

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