{% macro render_banners(package, current_user, validation) -%}
{{ _("State") }}: {{ package.state.value }} {% for state in package.get_next_states(current_user) %}
{% endfor %}
{% for note in validation %}
{{ note.message }}
{% for button in note.buttons %} {{ button[1] }} {% endfor %}
{% endfor %}

{% 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")) %}
{{ _("Open Thread") }} {{ _("Package approval thread") }}: {{ _("You can open a thread if you have a question for the approver or package author.") }}
{% endif %} {% endmacro %}