{% extends "superadmin/base_superadmin.html" %} {% block page_title %}User Management{% endblock %} {% block page_description %}Manage all users, admins, and permissions{% endblock %} {% block superadmin_content %}

Total Users

{{ users|length }}

Superadmins

{{ users|selectattr('is_superadmin')|list|length }}

Admins

{{ users|selectattr('is_admin')|list|length }}

Active Users

{{ users|selectattr('is_active')|list|length }}

All Users

Manage user permissions and status

{% for user in users %} {% endfor %}
User Group Role Status Joined Actions
{{ user.full_name[0] if user.full_name else 'U' }}
{{ user.full_name }}
{{ user.email }}
{% if user.custom_id %}
{{ user.custom_id }}
{% endif %}
{% if user.group %}
{{ user.group.name }} {{ user.group.group_code }}
{% else %} No Group {% endif %}
{% if user.is_superadmin %} Superadmin {% elif user.is_admin %} Admin {% else %} Member {% endif %}
{% if user.is_active %} Active {% else %} Inactive {% endif %} {{ user.created_at.strftime('%B %d, %Y') if user.created_at else 'N/A' }}
{% if not user.is_superadmin or user.id == current_user.id %} {% if not user.is_admin and not user.is_superadmin %} Promote {% elif user.is_admin and not user.is_superadmin %} Demote {% endif %} {% if user.is_active %} Deactivate {% else %} Activate {% endif %} {% else %} Protected User {% endif %}
{% endblock %}