{% extends "base.html" %} {% block title %}{{ detail.summary and account.email }} · User · Admin{% endblock %} {% set profile = account.profile %} {% set name = profile.full_name if profile else account.email.split('@')[0] %} {% block content %}
Back to users {# ---------- Header ---------- #}
{% if profile and profile.profile_picture %} {% else %}{{ name[0]|upper }}{% endif %}

{{ name }}

{{ 'Admin' if is_super_admin else 'Student' }} {% if detail.is_premium %}Premium{% endif %} {{ account.account_status.value|title }} {% if account.email_verified %} Email Verified {% else %} Email Not Verified {% endif %}

{{ account.email }}

Joined {{ account.created_at.strftime('%d %b %Y') }} {% if account.last_login %} · Last login {{ account.last_login.strftime('%d %b %Y') }}{% endif %} {% if account.email_verified and account.verified_at %} · Verified {{ account.verified_at.strftime('%d %b %Y') }}{% endif %}

{# ---------- Quick actions ---------- #}
View Public Profile {% if detail.is_premium %}
{% else %}
{% endif %} {% if account.account_status.value == 'suspended' %}
{% elif not is_self and not is_super_admin %}
{% endif %}
{# ---------- Summary stats ---------- #} {% set sm = detail.summary %}
{% for label, value, icon, color in [ ('Listings', sm.total_listings, 'bi-box-seam-fill', 'primary'), ('Active', sm.active_listings, 'bi-bag-check-fill', 'success'), ('Featured', sm.featured_listings, 'bi-stars', 'warning'), ('Views', sm.total_views, 'bi-eye-fill', 'info'), ('Favorites', sm.total_favorites, 'bi-heart-fill', 'danger'), ('Offers', sm.total_offers, 'bi-tag-fill', 'secondary'), ('Chats', sm.total_conversations, 'bi-chat-dots-fill', 'primary') ] %}
{{ "{:,}".format(value) }}
{{ label }}
{% endfor %}
{# ---------- Trust & safety: reports against this seller ---------- #} {% set rc = detail.report_counts %}
Reports {{ rc.open }} Open {{ rc.resolved }} Resolved
{# ---------- Premium + subscription history ---------- #}

Premium & subscriptions

{% if detail.subscription_active %}

Active {{ detail.subscription_active.plan_name|title }} · until {{ detail.subscription_active.end_date.strftime('%d %b %Y') }} ({{ detail.days_remaining }} day{{ '' if detail.days_remaining == 1 else 's' }} left)

{% else %}

No active premium subscription.

{% endif %} {% if detail.subscription_history %}
{% for sub in detail.subscription_history %} {% endfor %}
PlanStatusStartEnd
{{ sub.plan_name|title }} {{ sub.status.value|title }} {{ sub.start_date.strftime('%d %b %Y') }} {{ sub.end_date.strftime('%d %b %Y') }}
{% else %}

No subscription history.

{% endif %}
{# ---------- Recent activity ---------- #}

Recent activity

{% if detail.recent_activity %}
    {% for a in detail.recent_activity %}
  • {{ a.text }}

  • {% endfor %}
{% else %}

No recent activity.

{% endif %}
{# ---------- Listings ---------- #} {% if detail.listings %}

Recent listings

{% for l in detail.listings %} {% endfor %}
{% endif %}
{% endblock %}