implement thread mod ops

This commit is contained in:
2025-07-01 23:34:48 +03:00
parent 29bb9872d3
commit bd556d102b
2 changed files with 47 additions and 6 deletions

View File

@ -28,13 +28,13 @@
{% endif %}
{% if can_lock %}
<form class="modform" action="{{ url_for("threads.lock", slug=thread.slug) }}" method="post">
<input type=hidden value="{{ (not thread.is_locked) | int }}">
<input type=hidden name='target_op' value="{{ (not thread.is_locked) | int }}">
<input class="warn" type="submit" value="{{"Unlock thread" if thread.is_locked else "Lock thread"}}">
</form>
{% endif %}
{% if active_user.is_mod() %}
<form class="modform" action="{{ url_for("threads.sticky", slug=thread.slug) }}" method="post">
<input type=hidden value="{{ (not thread.is_stickied) | int }}">
<input type=hidden name='target_op' value="{{ (not thread.is_stickied) | int }}">
<input class="warn" type="submit" value="{{"Unsticky thread" if thread.is_stickied else "Sticky thread"}}">
</form>
<form class="modform" action="{{ url_for("threads.move", slug=thread.slug) }}" method="post">