{% extends "base_template.html" %} {% block title %}{{ _('Users') }} - {{ _('Admin') }}{% endblock %} {% block breadcrumb %} {% endblock %} {% block content %}
| {{ _('Email') }} | {{ _('Role') }} | {{ _('Status') }} | {{ _('Created') }} | {# Pinned to the right in the panel (admin's panel.css), so Edit and Delete stay in view on a phone. #}{{ _('Actions') }} |
|---|---|---|---|---|
| {{ user.email or '' }}{% if user.id == current_user.id %} {{ _('you') }}{% endif %} | {% if user.role == 'admin' %}{{ _('Administrator') }} {% elif user.role == 'staff' %}{{ _('Staff') }} {% elif user.role == 'user' %}{{ _('User') }} {# A role the vocabulary does not know, written by an earlier set-role or by hand. Spelled as stored, so it is not mistaken for a plain user. #} {% else %}{{ user.role }}{% endif %} | {% if user.active %}{{ _('Active') }} {% else %}{{ _('Inactive') }}{% endif %} | {{ user.created_at.strftime('%Y-%m-%d') if user.created_at else '' }} | {{ _('Edit') }} {% if user.id != current_user.id %} {# Deactivating is the usual answer and lives on the edit screen; this is for the account created by mistake. The address is the account holder's own text, so it reaches the script as plain text (striptags undoes the HTML escaping) turned into JSON, in a single quoted attribute no quote in it can leave. #} {% endif %} |