44 lines
1.8 KiB
HTML
44 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div style="font-family:'Silkscreen',monospace; font-size:14px; color:#d4879c; margin-bottom:16px; text-transform:uppercase;">
|
|
<a href="/admin" style="color:#888;">admin</a> :: threads
|
|
</div>
|
|
|
|
{% for t in threads %}
|
|
<div class="post" {% if t.hidden %}style="border-color:#ff6b6b;"{% endif %}>
|
|
<div style="display:flex; justify-content:space-between; align-items:center;">
|
|
<div>
|
|
{% if t.hidden %}
|
|
<span style="color:#ff6b6b; font-size:10px;">[hidden]</span>
|
|
{% endif %}
|
|
<span style="color:#e0e0e0;">{{ t.title }}</span>
|
|
<span style="color:#888; font-size:10px; margin-left:8px;">by {{ t.author_username }}</span>
|
|
<span style="color:#888; font-size:10px; margin-left:8px;">{{ t.created_at }}</span>
|
|
</div>
|
|
<div style="display:flex; gap:8px;">
|
|
{% if !t.hidden %}
|
|
<form method="post" action="/admin/threads/{{ t.id }}/hide" style="display:inline;">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<button type="submit" class="btn btn-sm">hide</button>
|
|
</form>
|
|
{% else %}
|
|
<form method="post" action="/admin/threads/{{ t.id }}/unhide" style="display:inline;">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<button type="submit" class="btn btn-sm">unhide</button>
|
|
</form>
|
|
{% endif %}
|
|
<form method="post" action="/admin/threads/{{ t.id }}/delete" style="display:inline;">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<button type="submit" class="btn btn-sm" style="background:#ff0000;">delete</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if threads.is_empty() %}
|
|
<div style="color:#888;">no threads found</div>
|
|
{% endif %}
|
|
{% endblock %}
|