You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/admins/salesmans/shared/_list.html.erb

37 lines
1.5 KiB

<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>