diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-05-25 19:06:05 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-05-25 19:06:05 +0100 |
| commit | fb2552ab558b227f03a3b092eeb6a5f7bc406900 (patch) | |
| tree | b15887f939528d1239e1c5080f93aedcded2f690 /app/templates | |
| parent | 53df124973c15b90e070f9225fcbeccdb0e64e55 (diff) | |
| download | cheatdb-fb2552ab558b227f03a3b092eeb6a5f7bc406900.tar.xz | |
Finish screenshot approval feature
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/packages/screenshot_edit.html | 2 | ||||
| -rw-r--r-- | app/templates/packages/view.html | 12 | ||||
| -rw-r--r-- | app/templates/todo.html | 19 |
3 files changed, 27 insertions, 6 deletions
diff --git a/app/templates/packages/screenshot_edit.html b/app/templates/packages/screenshot_edit.html index 7e0f9dc..b53c07e 100644 --- a/app/templates/packages/screenshot_edit.html +++ b/app/templates/packages/screenshot_edit.html @@ -5,6 +5,8 @@ {% endblock %} {% block content %} + <img src="{{ screenshot.getThumbnailURL() }}" alt="{{ screenshot.title }}" /> + {% from "macros/forms.html" import render_field, render_submit_field %} <form method="POST" action="" enctype="multipart/form-data"> {{ form.hidden_tag() }} diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index 85a0b7d..e0f03c0 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -41,11 +41,13 @@ <ul class="screenshot_list"> {% for ss in package.screenshots %} - <li> - <a href="{% if package.checkPerm(current_user, 'ADD_SCREENSHOTS') %}{{ ss.getEditURL() }}{% else %}{{ ss.url }}{% endif %}"> - <img src="{{ ss.getThumbnailURL() }}" alt="{{ ss.title }}" /> - </a> - </li> + {% if ss.approved or package.checkPerm(current_user, "ADD_SCREENSHOTS") %} + <li> + <a href="{% if package.checkPerm(current_user, 'ADD_SCREENSHOTS') %}{{ ss.getEditURL() }}{% else %}{{ ss.url }}{% endif %}"> + <img src="{{ ss.getThumbnailURL() }}" alt="{{ ss.title }}" /> + </a> + </li> + {% endif %} {% endfor %} </ul> diff --git a/app/templates/todo.html b/app/templates/todo.html index 35aee9a..b20f26c 100644 --- a/app/templates/todo.html +++ b/app/templates/todo.html @@ -8,7 +8,7 @@ {% if canApproveNew %} <h2>Packages Awaiting Approval</h2> <ul> - {% for p in approve_new %} + {% for p in packages %} <li><a href="{{ p.getDetailsURL() }}"> {{ p.title }} by {{ p.author.display_name }} </a></li> @@ -18,6 +18,23 @@ </ul> {% endif %} + {% if canApproveScn %} + <h2>Screenshots Awaiting Approval</h2> + <ul> + {% for s in screenshots %} + <li> + <a href="{{ s.getEditURL() }}">{{ s.title }}</a> + on + <a href="{{ s.package.getDetailsURL() }}"> + {{ s.package.title }} by {{ s.package.author.display_name }} + </a> + </li> + {% else %} + <li><i>No screenshots need reviewing.</i></ul> + {% endfor %} + </ul> + {% endif %} + {% if canApproveRel %} <h2>Releases Awaiting Approval</h2> <ul> |
