{% extends "root.html" %}
{% block content %}
<div class="space-y-4 text-left max-w-2xl">
<div class="text-sm opacity-70">
<a href="/t/{{ post.topic_id }}#post-{{ post.post_number }}" class="link link-hover">← Back to post #{{ post.post_number }}</a>
</div>
<h1 class="text-2xl font-bold"><i class="fas fa-shield-halved text-warning mr-1"></i>Moderate post #{{ post.post_number }}</h1>
<p class="text-sm opacity-70">
The post's body is replaced by your note, shown as <strong>staff: …</strong> under {% if author %}<a href="/admin/users/{{ post.user_id }}" class="link">{{ author }}</a>{% else %}the author{% endif %}'s name.
The change is a revision in the post's history; the author can't edit it back (staff can restore it).
Any flags waiting on it are marked upheld.
</p>
{% if flags %}
<div class="card bg-base-200 border border-error/40 p-3 text-sm space-y-1">
<p class="font-semibold"><i class="fas fa-flag text-error mr-1"></i>{{ flags | length }} pending flag(s)</p>
<ul class="list-disc pl-5">{% for f in flags %}<li>{{ f.reason_label }} — <a href="/admin/users/{{ f.flagger_id }}" class="link link-hover">{{ f.flagger }}</a>{% if f.note %}: “{{ f.note }}”{% endif %}</li>{% endfor %}</ul>
</div>
{% endif %}
<details class="card bg-base-200 border border-base-300 p-3" {% if not post.moderated_at %}open{% endif %}>
<summary class="cursor-pointer text-sm font-semibold">Current body</summary>
<div class="prose prose-sm max-w-none mt-2">{{ post.cooked | safe }}</div>
</details>
<form class="card bg-base-200 border border-warning/50 p-4 space-y-3" method="post" action="/p/{{ post.id }}/moderate" hx-boost="false">
<label class="form-control">
<span class="label-text">Staff note (markdown)</span>
<textarea name="note" rows="4" required maxlength="2000" class="textarea textarea-bordered w-full font-mono text-sm"
placeholder="Removed: personal attack. Please keep it civil."></textarea>
</label>
<label class="flex items-center gap-2 text-sm">
<input type="checkbox" name="hide_original" value="1" class="checkbox checkbox-sm">
Hide the original from non-staff in the edit history (you can show it again later)
</label>
<div class="flex justify-end gap-2">
<a href="/t/{{ post.topic_id }}#post-{{ post.post_number }}" class="btn btn-ghost btn-sm">Cancel</a>
<button type="submit" class="btn btn-warning btn-sm"><i class="fas fa-shield-halved mr-1"></i>Replace with note</button>
</div>
</form>
</div>
{% endblock %}
neiam
/recourse
public · Issues · Pulls · Labels · Forks · Compare · Actions running · Badges · Packages
⭐
Log in to mark this repository.
2.5 KiB · text
History
3d71adc