diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-07-28 15:19:30 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-07-28 15:19:30 +0100 |
| commit | 909a2b4ce9ffd325fff06cc26d996c19ca117aa6 (patch) | |
| tree | d830c632731c358f662c75b5efb45fc04fcb7423 /app/templates | |
| parent | df8d05f09d3dd7dacdb401661ea60706d2f21779 (diff) | |
| download | cheatdb-909a2b4ce9ffd325fff06cc26d996c19ca117aa6.tar.xz | |
Add support for post-approval threads
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/macros/threads.html | 2 | ||||
| -rw-r--r-- | app/templates/packages/view.html | 7 |
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 %}🔒 {% 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 %} |
