{% from "common/macros.html" import timestamp, accordion %}
{% extends "base.html" %}
{% block content %}
{% set guests = (users | selectattr('permission', 'eq', PermissionLevel.GUEST.value) | list) %}
{% set not_guests = (users | selectattr('permission', 'gt', PermissionLevel.GUEST.value) | list) %}
{% call(section) accordion(disabled=(guests | count==0)) %}
{% if section == "header" %}
Unconfirmed guests
{% elif section == "content" %}
Username |
Signed up on |
{% for user in guests %}
{{user['username']}}
|
{{ timestamp(user.created_at) }}
|
{% endfor %}
{% endif %}
{% endcall %}
{% call(section) accordion() %}
{% if section == "header" %}
Other users
{% elif section == "content" %}
Username |
Permission |
Signed up on |
{% if active_user.is_admin() %}
Create password reset link |
{% endif %}
{% for user in not_guests %}
{{user['username']}}
|
{{ user.permission | permission_string }}
|
{{ timestamp(user.created_at) }}
|
{% if active_user.is_admin() %}
|
{% endif %}
{% endfor %}
{% endif %}
{% endcall %}
{% endblock %}