diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-03-21 19:53:53 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-03-21 19:53:53 +0000 |
| commit | 8a8b0e505bab6ea4d631e7c63dad9260ff7e8936 (patch) | |
| tree | f1d8c3f1378b7bffa87fcf09717f750efdf496ed /app/templates | |
| parent | 71691708ae121493cf52b19acbb6893caf8fe7ed (diff) | |
| download | cheatdb-8a8b0e505bab6ea4d631e7c63dad9260ff7e8936.tar.xz | |
Improve permission checking in work queue
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/todo.html | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/app/templates/todo.html b/app/templates/todo.html index edb7d4a..35aee9a 100644 --- a/app/templates/todo.html +++ b/app/templates/todo.html @@ -5,29 +5,33 @@ {% endblock %} {% block content %} - <h2>Packages Awaiting Approval</h2> - <ul> - {% for p in approve_new %} - <li><a href="{{ p.getDetailsURL() }}"> - {{ p.title }} by {{ p.author.display_name }} - </a></li> - {% else %} - <li><i>No packages need reviewing.</i></ul> - {% endfor %} - </ul> + {% if canApproveNew %} + <h2>Packages Awaiting Approval</h2> + <ul> + {% for p in approve_new %} + <li><a href="{{ p.getDetailsURL() }}"> + {{ p.title }} by {{ p.author.display_name }} + </a></li> + {% else %} + <li><i>No packages need reviewing.</i></ul> + {% endfor %} + </ul> + {% endif %} - <h2>Releases Awaiting Approval</h2> - <ul> - {% for r in releases %} - <li> - <a href="{{ r.getEditURL() }}">{{ r.title }}</a> - on - <a href="{{ r.package.getDetailsURL() }}"> - {{ r.package.title }} by {{ r.package.author.display_name }} - </a> - </li> - {% else %} - <li><i>No releases need reviewing.</i></ul> - {% endfor %} - </ul> + {% if canApproveRel %} + <h2>Releases Awaiting Approval</h2> + <ul> + {% for r in releases %} + <li> + <a href="{{ r.getEditURL() }}">{{ r.title }}</a> + on + <a href="{{ r.package.getDetailsURL() }}"> + {{ r.package.title }} by {{ r.package.author.display_name }} + </a> + </li> + {% else %} + <li><i>No releases need reviewing.</i></ul> + {% endfor %} + </ul> + {% endif %} {% endblock %} |
