{% extends 'core_main_app/_render/admin/theme/tools/box.html' %}

{% block box_title %}Pending requests{% endblock %}

{% block box_body %}
<table class="table table-bordered table-striped table-hover">
    <tr>
        <th width="10%">User</th>
        <th width="10%">First Name</th>
        <th width="10%">Late Name</th>
        <th width="20%">Email Address</th>
        <th width="20%">Date</th>
        <th>Actions</th>
    </tr>
    {% for request in data.requests %}
        <tr id="{{ request.id }}">
            {# FIXME add link to /admin/auth/user #}
            <td>{{ request.username }}</td>
            <td>{{ request.first_name}}</td>
            <td>{{ request.last_name}}</td>
            <td>{{ request.email}}</td>
            <td>{{ request.date }}</td>
            <td>
                <div class="btn btn-success accept_request">
                    <i class="fa fa-check"></i> Accept
                </div>
                <div class="btn btn-danger deny_request">
                    <i class="fa fa-times"></i> Deny
                </div>
            </td>
        </tr>
    {% empty %}
        <tr>
            <td class="empty" colspan="6">
                No account requests pending at the moment.
            </td>
        </tr>
    {% endfor %}
</table>
{% endblock %}