{% extends 'TopxiaAdminBundle:User:layout.html.twig' %}

{% block title %}用户认证审核 - {{ parent() }}{% endblock %}

{% set menu = 'approval' %}

{% set submenu = 'approving' %}

{% block main %}

{% include 'TopxiaAdminBundle:User:approval-header.html.twig' %}

{% if users %}
<table class="table table-striped">
  <thead>
    <tr>
      <th>ID</th>
      <th>用户昵称</th>
      <th>真实姓名</th>
      <th>身份证号码</th>
      <th>邮件</th>
      <th>申请时间</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>
  {% for user in users %}
    <tr id="user-table-tr-{{ user.id }}">
        <td>{{user.id }}</td>
        <td><strong>{{ admin_macro.user_link(user) }}</strong></td>
        <td> {{approvals[user.id].truename}}</td>
        <td> {{approvals[user.id].idcard}}</td>
        <td>{{user.email }}</td>
        <td>{{user.approvalTime | date('Y-m-d H:i')}}</td>
        <td>
         <a href="#modal" data-toggle="modal" data-url="{{ path('admin_approval_approve', {id:user.id}) }}" class="btn btn-default btn-sm">审核</a>
        </td>
    </tr>
  {% endfor %}
  </tbody>
</table>

{{ web_macro.paginator(paginator) }}
{% else %}
  <div class="empty">暂无需要审核中的实名认证用户</div>
{% endif %}

{% endblock %}
