 <table class="table table-hover identity-verifications-list-table">
  <thead class="thead-light">
    <tr>
      <th width="10%">序号</th>
      <th width="10%" class="text-left">昵称</th>
      <th width="10%">审核状态</th>
      <th width="10%"><%= sort_tag('创建于', name: 'created_at', path: admins_identity_verifications_path) %></th>
      <th width="14%">操作</th>
    </tr>
  </thead>
  <tbody>
    <% if identity_verifications.present? %>
      <% identity_verifications.each_with_index do |identity_verification, index| %>
        <tr class="identity-verification-item-<%= identity_verification.id %>">
          <td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
          <td class="text-left">
            <%= link_to "/#{identity_verification.user.login}", target: '_blank' do %>
                <%= overflow_hidden_span identity_verification.user.real_name, width: 100 %>
            <% end %>
          </td>
          <td><%= display_text(identity_verification.state) %></td>

          <td><%= display_text(identity_verification.created_at&.strftime('%Y-%m-%d %H:%M')) %></td>
          <td class="action-container">
            <%= link_to "#{ identity_verification.state == "待审核" ? '审核' : "查看"}", edit_admins_identity_verification_path(identity_verification), class: 'action' %>
          </td>
        </tr>
      <% end %>
    <% else %>
      <%= render 'admins/shared/no_data_for_table' %>
    <% end %>
  </tbody>
</table>

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