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.
28 lines
1.1 KiB
28 lines
1.1 KiB
<table class="table table-hover text-center customer-list-table">
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th width="10%">序号</th>
|
|
<th width="40%" class="text-left">客户名称</th>
|
|
<th width="30%"><%= sort_tag('添加时间', name: 'created_at', path: admins_partner_customers_path(current_partner)) %></th>
|
|
<th width="20%">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% if customers.present? %>
|
|
<% customers.each_with_index do |customer, index| %>
|
|
<tr class="customer-item-<%= customer.id %>">
|
|
<td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
|
|
<td class="text-left"><%= customer.school&.name %></td>
|
|
<td><%= customer.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
|
|
<td>
|
|
<%= delete_link '删除', admins_partner_customer_path(current_partner, customer, element: ".customer-item-#{customer.id}"), class: 'delete-customer-action' %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
<% else %>
|
|
<%= render 'admins/shared/no_data_for_table' %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= render partial: 'admins/shared/paginate', locals: { objects: customers } %> |