{#- The accounts: who, their address, whether they may sign in and have, administrators marked, how many communities, the last sign-in. Filtered by name or address, or by state; a row's ⋯ for what can be done with it. Overrides Abilian Core's page; drawn in `mockups/templates/admin-users.html`. -#} {% extends "admin/_ads.html" %} {% import "admin/_ads_macros.html" as a with context %} {% set kinds = [("all", _("All")), ("invited", _("Never signed in")), ("disabled", _("Disabled")), ("admins", _("Administrators"))] %} {% block page_title %}{{ _("Accounts") }} · {{ _("Administration") }}{% endblock %} {% block heading %}{{ _("Accounts") }}{% endblock %} {% block actions %}{{ icon("user-plus") }}{{ _("New account") }}{% endblock %} {% block content %}
{{ icon("filter") }} {% for name, value in listing.filter_fields() %}{% endfor %}
{{ m.sort_th(listing, "name", _("Name")) }} {{ m.sort_th(listing, "last_active", _("Last sign-in"), "ads-end") }} {% set communities = community_counts(rows | map('first')) %} {% for user, roles in rows %} {% set user_url = url_for('.users_user', user_id=user.id) %} {% else %} {% endfor %}
{{ _("State") }} {{ _("Communities") }}{{ _("Actions") }}
{{ m.avatar(user) }} {{ user.name }}{% if roles %}{{ _("Administrator") }}{% endif %} {{ user.email }} {{ a.state(user) }} {{ communities.get(user.id, 0) }} {% if user.last_active %}{{ m.time(user.last_active) }}{% else %}{{ _("never") }}{% endif %}
{{ icon("dots") }}
{{ icon("pencil") }}{{ _("Edit") }} {% set account_url = url_for('.users_account', user_id=user.id) %} {% if user.can_login %}
{{ csrf.field() }}
{{ a.sign_in_as(user, "ads-menu__item") }} {% endif %} {% if user != current_user %}
{{ csrf.field() }} {% if user.can_login %} {% else %} {% endif %}
{% endif %}
{{ _("No matching records found") }}
{{ m.pagination(listing) }}
{% endblock %}