<table class="table table-hover text-center mirror-script-list-table">
  <thead class="thead-light">
  <tr>
    <th width="10%">ID</th>
    <th width="20%" class="text-left">名称</th>
    <th width="34%" class="text-left">说明</th>
    <th width="16%">更新时间</th>
    <th width="20%">操作</th>
  </tr>
  </thead>
  <tbody>
  <% if scripts.present? %>
    <% scripts.each do |script| %>
      <tr class="mirror-script-item-<%= script.id %>">
        <td><%= script.id %></td>
        <td class="text-left"><%= overflow_hidden_span script.script_type, width: 200 %></td>
        <td class="text-left"><%= overflow_hidden_span script.description, width: 400 %></td>
        <td><%= script.updated_at.strftime('%Y-%m-%d %H:%M') %></td>
        <td class="action-container">
          <%= link_to '编辑', edit_admins_mirror_repository_mirror_script_path(mirror, script), class: 'action edit-action' %>

          <%= delete_link '删除', admins_mirror_repository_mirror_script_path(mirror, script, element: ".mirror-script-item-#{script.id}"), class: 'delete-mirror-script-action' %>
        </td>
      </tr>
    <% end %>
  <% else %>
    <%= render 'admins/shared/no_data_for_table' %>
  <% end %>
  </tbody>
</table>

<%= render partial: 'admins/shared/paginate', locals: { objects: scripts } %>