{% macro render_banners(package, current_user, validation) -%}
{% if package.state == package.state.READY_FOR_REVIEW %} {% if not package.get_download_release() %} {{ _("Please wait for the release to be approved.") }} {% elif package.check_perm(current_user, "APPROVE_NEW") %} {{ _("You can now approve this package if you're ready.") }} {% else %} {{ _("Please wait for the package to be approved.") }} {% endif %} {% elif package.state.READY_FOR_REVIEW in package.get_next_states(current_user) %} {% if package.check_perm(current_user, "EDIT_PACKAGE") %} {{ _("You can now submit this package for approval if you're ready.") }} {% else %} {{ _("This package can be submitted for approval when ready.") }} {% endif %} {% else %} {{ _("You need to fix the above errors before you can submit for review") }} {% endif %}
{% if not package.review_thread and (package.author == current_user or package.check_perm(current_user, "APPROVE_NEW")) %}