{% extends "persons/master.html" %}

{% block title %}Registration Pending{% endblock %}

{% block content %}

{% if view.session %}

<h2>Pending Registrations</h2>
  {% if objectRegister.count %}
<p>Please approve {{registerCount}} pending registrations.</p>
  <table>
    <tr>
      <th>Full name
      </th>
      <th>Login
      </th>
      <th>Email
      </th>
      <th>Actions
      </th>
    </tr>
    {% for person in objectRegister.getSortedList %}
    <tr><td><a href="{{uriPrefix}}/persons/{{ person.name }}/" title="{{ person.fullname }}">{{ person.fullname }}</a></td>
    <td>{{ person.name }}</td>
    <td>{{ person.email }}</td>
    <td>
    <a href="{{uriPrefix}}/persons/{{ person.name }}/approve/" title="{{ person.fullname }}">Approve</a>
    <a href="{{uriPrefix}}/persons/{{ person.name }}/delete/" title="{{ person.fullname }}">Delete</a>
    </td></tr>
    {% endfor %}
  </table>
  {% else %}
<p>No accounts pending.</p>
  {% endif %}
{% else %}
<h2>Registration Pending</h2>
<p>Thank you for registering with the service.</p>
<p>Your registration is being approved by the service admins.</p>
{% endif %}

{% endblock %}
