diff options
| author | rubenwardy <rw@rubenwardy.com> | 2020-07-11 01:34:51 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2020-07-11 01:42:47 +0100 |
| commit | bf927c50f00bd15c7bc1765b7d5fb0c6a6abeb86 (patch) | |
| tree | ff27c709826ce17002e1d670938b5a6142608695 /app/templates/threads | |
| parent | 5f7be4b4337358e35c9eda4b261260a08a958b4a (diff) | |
| download | cheatdb-bf927c50f00bd15c7bc1765b7d5fb0c6a6abeb86.tar.xz | |
Add the ability to lock threads
Diffstat (limited to 'app/templates/threads')
| -rw-r--r-- | app/templates/threads/view.html | 13 |
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 %} |
