diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-05-21 22:26:48 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-05-21 22:26:48 +0100 |
commit | 0a72a38dd0fa380afa85d8176ccf0ed60d7d237d (patch) | |
tree | 36813adc0c3f86eb112a030836ab961a20940db3 | |
parent | acad90c3123a3a879c8d5cda040a4702114d19b0 (diff) | |
download | cheatdb-0a72a38dd0fa380afa85d8176ccf0ed60d7d237d.tar.xz |
Add release requirement to package approval
-rw-r--r-- | app/templates/packages/view.html | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index d6cb8ca..150abee 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -8,12 +8,20 @@ {% if not package.approved %} <div class="box box_grey alert alert-warning"> <span class="icon_message"></span> - This package needs to be approved before it can be found. - {% if package.checkPerm(current_user, "APPROVE_NEW") %} - <form method="post" action="{{ package.getApproveURL() }}"> - <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> - <input type="submit" value="Approve" /> - </form> + {% if package.releases.count() == 0 %} + You need to create a release before this package can be approved. + {% elif not package.getDownloadRelease() %} + Please wait for the release to be approved. + {% else %} + {% if package.checkPerm(current_user, "APPROVE_NEW") %} + You can now approve this package if you're ready. + <form method="post" action="{{ package.getApproveURL() }}"> + <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> + <input type="submit" value="Approve" /> + </form> + {% else %} + This package needs to be approved before it can be found. + {% endif %} {% endif %} <div style="clear: both;"></div> </div> |