2.8 KiB · text History 3d71adc
{% extends "root.html" %}
{# One user, for staff (src/handlers/moderation.rs user_page): status and
   the sanction controls, then their flags and their log. #}
{% block content %}
<div class="space-y-4 text-left">
  {% include "admin/_mod_nav.html" %}
  <div class="text-sm opacity-70"><a href="/admin/users" class="link link-hover">Users</a> / {{ u.username }}</div>
  {% include "admin/_user_card.html" %}
  <div class="flex flex-wrap gap-2 text-sm">
    <a class="btn btn-ghost btn-xs" href="/admin/flags?author={{ u.id }}"><i class="fas fa-flag mr-1"></i>Pending flags on their posts</a>
    <a class="btn btn-ghost btn-xs" href="/admin/flags?flagger={{ u.id }}"><i class="far fa-flag mr-1"></i>Pending flags they raised</a>
    <a class="btn btn-ghost btn-xs" href="/admin/log?user={{ u.id }}"><i class="fas fa-clipboard-list mr-1"></i>Their log entries</a>
  </div>

  <section class="space-y-1">
    <h2 class="text-sm font-semibold uppercase tracking-wide opacity-60">Flags on their posts <span class="font-mono">{{ received | length }}</span></h2>
    {% for f in received %}
    <p class="text-sm"><a href="/p/{{ f.post_id }}" class="link link-hover">post</a> · {{ f.reason }} by {{ f.who }} · <span class="badge badge-sm">{{ f.status }}</span> · {{ f.when }}{% if f.note %} — <span class="italic opacity-80">“{{ f.note }}”</span>{% endif %}</p>
    {% else %}<p class="text-sm opacity-60">None.</p>{% endfor %}
  </section>

  <section class="space-y-1">
    <h2 class="text-sm font-semibold uppercase tracking-wide opacity-60">Flags they raised <span class="font-mono">{{ raised | length }}</span></h2>
    {% for f in raised %}
    <p class="text-sm"><a href="/p/{{ f.post_id }}" class="link link-hover">post</a> · {{ f.reason }} · <span class="badge badge-sm">{{ f.status }}</span> · {{ f.when }}{% if f.note %} — <span class="italic opacity-80">“{{ f.note }}”</span>{% endif %}</p>
    {% else %}<p class="text-sm opacity-60">None.</p>{% endfor %}
  </section>

  <section class="space-y-1">
    <h2 class="text-sm font-semibold uppercase tracking-wide opacity-60">Moderation log <a href="/admin/log?user={{ u.id }}" class="link normal-case font-normal">all</a></h2>
    {% for e in log %}
    <p class="text-sm" data-action="{{ e.action }}"><span class="opacity-60" title="{{ e.when_abs }}">{{ e.when }}</span> · {{ e.action_label }} {% if e.target_href %}<a href="{{ e.target_href }}" class="link link-hover">{{ e.target_label }}</a>{% else %}{{ e.target_label }}{% endif %} · by {% if e.actor_id %}<a href="/admin/users/{{ e.actor_id }}" class="link link-hover">{{ e.actor }}</a>{% else %}{{ e.actor }}{% endif %}{% if e.reason %} — <span class="italic opacity-80">{{ e.reason }}</span>{% endif %}</p>
    {% else %}<p class="text-sm opacity-60">Nothing logged.</p>{% endfor %}
  </section>
</div>
{% endblock %}