Add the ability to lock threads
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user