diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-12-22 20:13:43 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-12-22 20:25:22 +0000 |
| commit | c551201f792aa288a49c986aab264f4692e3b478 (patch) | |
| tree | d894bc68c7a0b06b642e7eceb7032fc5a1115420 /app/templates/packages/view.html | |
| parent | a21a5c24d8baa2f14000ca64c10ea315fab708bd (diff) | |
| download | cheatdb-c551201f792aa288a49c986aab264f4692e3b478.tar.xz | |
Improve thread styling
Diffstat (limited to 'app/templates/packages/view.html')
| -rw-r--r-- | app/templates/packages/view.html | 42 |
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 %}🔒{% 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 %}🔒{% 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> |
