aboutsummaryrefslogtreecommitdiff
path: root/app/templates/threads/view.html
diff options
context:
space:
mode:
Diffstat (limited to 'app/templates/threads/view.html')
-rw-r--r--app/templates/threads/view.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/templates/threads/view.html b/app/templates/threads/view.html
index ef53d1f..f92ef39 100644
--- a/app/templates/threads/view.html
+++ b/app/templates/threads/view.html
@@ -17,6 +17,19 @@
<input type="submit" class="btn btn-primary" value="Subscribe" />
</form>
{% endif %}
+ {% if thread and thread.checkPerm(current_user, "LOCK_THREAD") %}
+ {% if thread.locked %}
+ <form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=0) }}" class="float-right mr-2">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
+ <input type="submit" class="btn btn-secondary" value="{{ _('Unlock Thread') }}" />
+ </form>
+ {% else %}
+ <form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=1) }}" class="float-right mr-2">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
+ <input type="submit" class="btn btn-secondary" value="{{ _('Lock Thread') }}" />
+ </form>
+ {% endif %}
+ {% endif %}
{% endif %}
{% if current_user == thread.author and thread.review %}