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.
29 lines
1.1 KiB
29 lines
1.1 KiB
<table class="table table-hover text-center partner-list-table">
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th width="50%" class="text-left">名称</th>
|
|
<th width="30%"><%= sort_tag('添加时间', name: 'created_at', path: admins_partners_path) %></th>
|
|
<th width="20%">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% if partners.present? %>
|
|
<% partners.each do |partner| %>
|
|
<tr class="partner-item-<%= partner.id %>">
|
|
<td class="text-left">
|
|
<%= link_to partner.school&.name || partner.name, customers_partner_path(partner), target: '_blank' %>
|
|
</td>
|
|
<td><%= partner.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
|
|
<td>
|
|
<%= link_to '查看', admins_partner_customers_path(partner), class: 'action' %>
|
|
<%= delete_link '删除', admins_partner_path(partner, element: ".partner-item-#{partner.id}"), class: 'delete-partner-action' %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
<% else %>
|
|
<%= render 'admins/shared/no_data_for_table' %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= render partial: 'admins/shared/paginate', locals: { objects: partners } %> |