<table class="table table-hover text-center subject-list-table">
  <thead class="thead-light">
  <tr>
    <th width="5%">序号</th>
    <th width="10%" class="text-left">昵称</th>
    <th width="10%">手机号码</th>
<!--    <th width="8%">用户类型</th>-->
<!--    <th width="8%">专业领域</th>-->
<!--    <th width="15%">单位</th>-->
    <th width="10%">报名时间</th>
    <% watchers&.first&.watchable&.enroll_field.to_s.split(",").each do |str| %>
      <th><%= str %></th>
    <% end %>
  </tr>
  </thead>
  <tbody>
  <% if watchers.present? %>
    <% watchers.each_with_index do |watch, index| %>
      <tr class="user-item-<%= watch.user.id %>">
        <td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
        <td class="text-left">
          <%= link_to "/#{watch.user.login}", target: '_blank' do %>
            <%= overflow_hidden_span watch.user.real_name, width: 100 %>
          <% end %>
        </td>
        <td><%= overflow_hidden_span display_text(watch.user.phone), width: 100 %></td>
<!--        <td><%#= watch.user.try(:user_type).blank? ? "" : ["事业单位", "企业单位", "科研人员", "高校教师", "高校学生", "程序员", "其他"][watch.user.try(:user_type).to_i] %></td>-->
<!--        <td><%#= watch.user.try(:professional_field).blank? ? "" : "#{Site.dict_str("professional_field", "#{watch.user.professional_field}")}" %></td>-->
<!--        <td><%#= overflow_hidden_span display_text(watch.user.try(:company_name)), width: 150 %></td>-->
        <td><%= display_text(watch.created_at&.strftime('%Y-%m-%d %H:%M')) %></td>
        <% watch.ext_info_str.each do |str| %>
          <td><%= str %></td>
        <% end %>
      </tr>
    <% end %>
  <% else %>
    <%= render 'admins/shared/no_data_for_table' %>
  <% end %>
  </tbody>
</table>

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