<table class="table table-hover text-center salesman-list-table">
  <thead class="thead-light">
  <tr>
    <th width="6%">序号</th>
    <th width="20%" class="text-left">业务员</th>
    <th width="30%" class="text-left">重点跟踪客户(点击数字客户列表)</th>
    <th width="30%" class="text-left">重点跟踪院校(点击数字渠道列表)</th>
    <th width="14%">操作</th>
  </tr>
  </thead>
  <tbody>
  <% if @salesmans.present? %>
    <% @salesmans.each_with_index do |salesman, index| %>
      <tr class="salesman-item salesman-item-<%= salesman.id %>">
        <td><%= index + 1 %></td>
        <td class="text-left">
          <span><%= link_to salesman.name, admins_salesman_path(salesman), :title => salesman.name %></span>
        </td>
        <td class="text-left">
          <span><%= link_to salesman.salesman_customers_count.to_i,
                            admins_salesman_customers_path(salesman_id: salesman), :title => "点击进入客户列表" %></span>
        </td>
        <td class="text-left">
          <span><%= link_to salesman.salesman_channels_count.to_i, admins_salesman_channels_path(salesman_id: salesman),
                            :title => "点击进入渠道列表" %></span>
        </td>
        <td>
          <%= delete_link '删除', admins_salesman_path(salesman, element: ".salesman-item-#{salesman.id}"),
                          class: 'delete-salesman-action' %>
        </td>
      </tr>
    <% end %>
  <% else %>
    <%= render 'admins/shared/no_data_for_table' %>
  <% end %>
  </tbody>
</table>