{% extends "layouts/dashboard.html" %} {% load i18n %} {% block breadcrumbs %} {% endblock %} {% block content %} {% trans "User management" as users_eyebrow %} {% trans "Users" as users_title %} {% trans "Search, review, activate, and bulk-import accounts across the platform." as users_subtitle %}
{% include "components/page_header_text.html" with eyebrow=users_eyebrow title=users_title subtitle=users_subtitle size="lg" with_glyph=False %}
{% translate "Pending review" %} {% if pending_count %}{{ pending_count }}{% endif %} {% translate "Bulk import" %} {% include "components/export_button.html" with size="lg" %} {% translate "New user" %}
{# Filters #}
{% translate "Reset" %}
{# Results #}

{{ paginator.count|default:0 }} {% translate "user(s)" %}

{% if unverified_count %} {{ unverified_count }} {% translate "unverified" %} → {% endif %}
{% if users %}
{% for u in users %} {% endfor %}
{% translate "User" %} {% translate "Role" %} {% translate "Institution" %} {% translate "Joined" %} {% translate "Status" %}
{{ u.get_full_name|default:u.email }}
{{ u.email }}
{% if u.role %} {{ u.get_role_display }} {% else %} {% endif %} {% if u.institution %} {{ u.institution.name|truncatechars:32 }} {% elif u.non_partner_institution_name %} {{ u.non_partner_institution_name|truncatechars:32 }} * {% else %} {% endif %} {{ u.date_joined|date:"j M Y" }} {% if not u.is_active %}{% translate "Inactive" %} {% elif u.pending_admin_review %}{% translate "Pending review" %} {% elif not u.email_verified %}{% translate "Unverified" %} {% else %}{% translate "Active" %}{% endif %}
{% translate "Edit" %} {% if u.is_active and u.pk != request.user.pk and not u.is_superuser %} {% url 'accounts:manage_deactivate_user' u.pk as deactivate_url %} {% include "components/confirm_button.html" with trigger_label="Deactivate" trigger_class="font-meta text-[11px] uppercase tracking-[0.10em] text-ruforum-text-muted hover:text-rose-600 transition-colors" action_url=deactivate_url danger=True eyebrow=u.email title="Deactivate this account?" lede="The user will be signed out and blocked from signing in until reactivated. Their records are kept." confirm_label="Deactivate user" confirm_class="btn-danger" %} {% elif not u.is_active %}
{% csrf_token %}
{% endif %} {% if u.pk != request.user.pk and not u.is_superuser %} {% url 'accounts:manage_delete_user' u.pk as delete_url %} {% include "components/confirm_button.html" with trigger_label="Delete" trigger_class="font-meta text-[11px] uppercase tracking-[0.10em] text-rose-600 hover:text-rose-800 transition-colors" action_url=delete_url danger=True eyebrow=u.email title="Permanently delete this user?" lede="This cannot be undone. If the account has linked records it will be deactivated instead of deleted." confirm_label="Delete user" confirm_class="btn-danger" %} {% endif %}
{% if is_paginated %}
{% blocktranslate with start=page_obj.start_index end=page_obj.end_index total=paginator.count %}Showing {{ start }}–{{ end }} of {{ total }}{% endblocktranslate %}
{% if page_obj.has_previous %} {% translate "Prev" %} {% endif %} {{ page_obj.number }} / {{ paginator.num_pages }} {% if page_obj.has_next %} {% translate "Next" %} {% endif %}
{% endif %} {% else %}

{% translate "No users match these filters" %}

{% translate "Try widening the search, or clear the filters to see everyone." %}

{% translate "Reset filters" %}
{% endif %}
{% endblock %}