aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-07-28 15:19:30 +0100
committerrubenwardy <rw@rubenwardy.com>2018-07-28 15:19:30 +0100
commit909a2b4ce9ffd325fff06cc26d996c19ca117aa6 (patch)
treed830c632731c358f662c75b5efb45fc04fcb7423 /app/templates
parentdf8d05f09d3dd7dacdb401661ea60706d2f21779 (diff)
downloadcheatdb-909a2b4ce9ffd325fff06cc26d996c19ca117aa6.tar.xz
Add support for post-approval threads
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/macros/threads.html2
-rw-r--r--app/templates/packages/view.html7
2 files changed, 8 insertions, 1 deletions
diff --git a/app/templates/macros/threads.html b/app/templates/macros/threads.html
index 023059a..cdb6b4f 100644
--- a/app/templates/macros/threads.html
+++ b/app/templates/macros/threads.html
@@ -28,7 +28,7 @@
{% macro render_threadlist(threads) -%}
<ul>
{% for t in threads %}
- <li><a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a> by {{ t.author.display_name }}</li>
+ <li>{% if t.private %}&#x1f512; {% endif %}<a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a> by {{ t.author.display_name }}</li>
{% else %}
<li><i>No threads found</i></li>
{% endfor %}
diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html
index 4bcc1cd..01cc474 100644
--- a/app/templates/packages/view.html
+++ b/app/templates/packages/view.html
@@ -171,6 +171,9 @@
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
<li><a href="{{ package.getCreateReleaseURL() }}">Create Release</a></li>
{% endif %}
+ {% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %}
+ <li><a href="{{ url_for('new_thread_page', pid=package.id) }}">Open Thread</a></li>
+ {% endif %}
{% if package.checkPerm(current_user, "DELETE_PACKAGE") %}
<li><a href="{{ package.getDeleteURL() }}">Delete</a></li>
{% endif %}
@@ -319,6 +322,10 @@
{% if threads %}
<h3>Threads</h3>
+ {% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %}
+ <p><a href="{{ url_for('new_thread_page', pid=package.id) }}">Open Thread</a></p>
+ {% endif %}
+
{% from "macros/threads.html" import render_threadlist %}
{{ render_threadlist(threads) }}
{% endif %}