aboutsummaryrefslogtreecommitdiff
path: root/app/templates/packages/view.html
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-12-22 20:13:43 +0000
committerrubenwardy <rw@rubenwardy.com>2018-12-22 20:25:22 +0000
commitc551201f792aa288a49c986aab264f4692e3b478 (patch)
treed894bc68c7a0b06b642e7eceb7032fc5a1115420 /app/templates/packages/view.html
parenta21a5c24d8baa2f14000ca64c10ea315fab708bd (diff)
downloadcheatdb-c551201f792aa288a49c986aab264f4692e3b478.tar.xz
Improve thread styling
Diffstat (limited to 'app/templates/packages/view.html')
-rw-r--r--app/templates/packages/view.html42
1 files changed, 22 insertions, 20 deletions
diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html
index 960c2b2..cb0c3ca 100644
--- a/app/templates/packages/view.html
+++ b/app/templates/packages/view.html
@@ -53,7 +53,7 @@
{% elif (package.type == package.type.GAME or package.type == package.type.TXP) and package.screenshots.count() == 0 %}
You need to add at least one screenshot.
- {% elif topic_error_lvl == "error" %}
+ {% elif topic_error_lvl == "danger" %}
Please fix the below topic issue(s).
{% elif "Other" in package.license.name or "Other" in package.media_license.name %}
@@ -97,26 +97,13 @@
</div>
{% endif %}
- {% if package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW") %}
- {% if review_thread %}
- <h2>{% if review_thread.private %}&#x1f512;{% endif %} {{ review_thread.title }}</h2>
- {% if review_thread.private %}
- <p><i>
- This thread is only visible to the package owner and users of
- Editor rank or above.
- </i></p>
- {% endif %}
-
- {% from "macros/threads.html" import render_thread %}
- {{ render_thread(review_thread, current_user) }}
- {% else %}
- <div class="alert alert-info">
- <a class="float-right btn btn-sm btn-info" href="{{ url_for('new_thread_page', pid=package.id, title='Package approval comments') }}">Open Thread</a>
+ {% if not review_thread and (package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW")) %}
+ <div class="alert alert-info">
+ <a class="float-right btn btn-sm btn-info" href="{{ url_for('new_thread_page', pid=package.id, title='Package approval comments') }}">Open Thread</a>
- Privately ask a question or give feedback
- <div style="clear:both;"></div>
- </div>
- {% endif %}
+ Privately ask a question or give feedback
+ <div style="clear:both;"></div>
+ </div>
{% endif %}
{% endif %}
@@ -301,6 +288,21 @@
</div>
</aside>
+ {% if not package.approved and (package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW")) %}
+ {% if review_thread %}
+ <h2>{% if review_thread.private %}&#x1f512;{% endif %} {{ review_thread.title }}</h2>
+ {% if review_thread.private %}
+ <p><i>
+ This thread is only visible to the package owner and users of
+ Editor rank or above.
+ </i></p>
+ {% endif %}
+
+ {% from "macros/threads.html" import render_thread %}
+ {{ render_thread(review_thread, current_user) }}
+ {% endif %}
+ {% endif %}
+
<ul class="screenshot_list mb-4">
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
<a class="btn btn-primary float-right" href="{{ package.getNewScreenshotURL() }}">Add screenshot</a>