{# Title row with topic delete/restore (topic.html, topic_focus.html). Shows the Classic/Focus switch when `toggle_base` is set. #}
<div class="flex items-start justify-between gap-3">
<h1 id="topic-title" class="text-3xl font-bold">
{% if topic.is_closed %}<i class="fas fa-lock opacity-60 mr-1" title="Closed"></i>{% endif %}
{{ topic.title }}
</h1>
<div class="flex flex-wrap items-center justify-end gap-2 shrink-0">
{% if toggle_base %}{% include "forum/_view_toggle.html" %}{% endif %}
{% if can_delete_topic %}
<form method="post" action="/t/{{ topic.id }}/delete" class="m-0"
hx-boost="false" onsubmit="return confirm('Delete this topic? It will be hidden from listings but kept so links don\'t break. Only a moderator can restore it.');">
<button type="submit" class="btn btn-ghost btn-xs text-error">Delete topic</button>
</form>
{% endif %}
{% if can_restore_topic %}
<form method="post" action="/t/{{ topic.id }}/restore" class="m-0">
<button type="submit" class="btn btn-ghost btn-xs">Restore topic</button>
</form>
{% endif %}
</div>
</div>
neiam
/recourse
public · Issues · Pulls · Labels · Forks · Compare · Actions running · Badges · Packages
⭐
Log in to mark this repository.
1.2 KiB · text
History
0c61284