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/repertoires/shared/_list.html.erb

27 lines
1.0 KiB

<table class="table table-hover text-center repertoires-list-table">
<thead class="thead-light">
<tr>
<th width="6%">序号</th>
<th width="54%" class="text-left">技术体系</th>
<th width="16%">操作</th>
</tr>
</thead>
<tbody>
<% if @repertoires.present? %>
<% @repertoires.each_with_index do |repertoire, index| %>
<tr class="repertoire-item discipline-item-<%= repertoire.id %>">
<td><%= index + 1 %></td>
<td class="text-left">
<span><%= link_to repertoire.name, admins_sub_repertoires_path(repertoire_id: repertoire), :title => repertoire.name %></span>
</td>
<td>
<%= link_to '编辑', edit_admins_repertoire_path(repertoire), remote: true, class: 'action' %>
<%= delete_link '删除', admins_repertoire_path(repertoire, element: ".repertoire-item-#{repertoire.id}"), class: 'delete-repertoire-action' %>
</td>
</tr>
<% end %>
<% else %>
<%= render 'admins/shared/no_data_for_table' %>
<% end %>
</tbody>
</table>