<table class="table table-hover text-center salesman-customer-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="12%" class="text-left">课堂数</th>
    <th width="12%">实训数</th>
    <th width="20%">操作</th>
  </tr>
  </thead>
  <tbody>
  <% if @customers.present? %>
    <% @customers.each_with_index do |customer, index| %>
      <tr class="customer-item salesman-customer-item-<%= customer.id %>">
        <td><%= index + 1 %></td>
        <td class="text-left">
          <span><%= link_to customer.name, user_path(customer), :title => customer.name %></span>
        </td>
        <td class="text-left">
          <span><%= customer.school_name %></span>
        </td>
        <td class="text-left">
          <span><%= customer.courses_count %></span>
        </td>
        <td>
          <%=  customer.shixuns_count %>
        </td>
        <td>
          <%= delete_link '删除', admins_salesman_customer_path(customer, salesman_id: customer.salesman_id, element: ".salesman-customer-item-#{customer.id}"), class: 'delete-salesman--action' %>
        </td>
      </tr>
    <% end %>
  <% else %>
    <%= render 'admins/shared/no_data_for_table' %>
  <% end %>
  </tbody>
</table>