<table class="table text-center shixun-settings-list-table">
  <thead class="thead-light">
    <tr>
      <th width="4%" class="text-left">序号</th>
      <th width="6%"><%= sort_tag('战队ID', name: 'competition_team_id', path: admins_competition_enroll_lists_path(@competition)) %></th>
      <th width="12%">战队名称</th>
      <th width="10%">创建者</th>
      <th width="10%">队员姓名</th>
      <th width="6%">职业</th>
      <th width="12%">学号</th>
      <th width="10%">队员学校</th>
      <th width="6%">地区</th>
      <th width="16%">指导老师</th>
      <th width="8%"><%= sort_tag('报名时间', name: 'created_at', path: admins_competition_enroll_lists_path(@competition)) %></th>
    </tr>
  </thead>
  <tbody>
  <% if enroll_lists.present? %>
    <% enroll_lists.each_with_index do |member, index| %>
      <tr id="competition-team-member-<%= member.id %>">
        <% team = member.competition_team %>
        <% page_no = list_index_no(@params_page.to_i, index) %>
        <td><%= page_no %></td>
        <td><%= member.competition_team_id %></td>
        <td><%= @personal ? "--" : team.name %></td>
        <td><%= team.user.real_name %></td>
        <td><%= member.user.real_name %></td>
        <td><%= member.user.identity %></td>
        <td><%= member.user.student_id %></td>
        <td><%= member.user.school_name %></td>
        <td><%= member.user.school_province %></td>
        <td><%= @personal ? "--" : team.teachers_info %></td>
        <td><%= member.created_at.strftime('%Y-%m-%d %H:%M') %></td>
      </tr>
    <% end %>
  <% else %>
    <%= render 'admins/shared/no_data_for_table' %>
  <% end %>
  </tbody>
</table>

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