{% macro render_banners(package, current_user, topic_error, topic_error_lvl, similar_topics) -%}
State: {{ package.state.value }} {% for state in package.getNextStates(current_user) %}
{% endfor %}
{% set level = "warning" %} {% if package.releases.count() == 0 %} {% set message %}

Release Required

{% if package.checkPerm(current_user, "MAKE_RELEASE") %}

You need to create a release before this package can be approved.

A release is a single downloadable version of your {{ package.type.value | lower }}. You need to create releases even if you use a rolling release development cycle, as Minetest needs them to check for updates.

Create Release {% else %} A release is required before this package can be approved. {% endif %} {% endset %} {% elif (package.type == package.type.GAME or package.type == package.type.TXP) and package.screenshots.count() == 0 %} {% set message = "You need to add at least one screenshot." %} {% elif topic_error_lvl == "danger" %} {% elif package.state == package.state.READY_FOR_REVIEW and ("Other" in package.license.name or "Other" in package.media_license.name) %} {% set message = "Please wait for the license to be added to CDB." %} {% else %} {% set level = "info" %} {% set message %} {% if package.screenshots.count() == 0 %} You should add at least one screenshot, but this isn't required.
{% endif %} {% if package.state == package.state.READY_FOR_REVIEW %} {% if not package.getDownloadRelease() %} Please wait for the release to be approved. {% elif package.checkPerm(current_user, "APPROVE_NEW") %} You can now approve this package if you're ready. {% else %} Please wait for the package to be approved. {% endif %} {% else %} {% if package.checkPerm(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 %} {% endif %} {% endset %} {% endif %} {% if message %}
{{ message | safe }}
{% endif %} {% if topic_error %}
{{ topic_error | safe }}
{% endif %} {% if similar_topics %}
Please make sure that this package has the right to the name '{{ package.name }}'. See the Inclusion Policy for more info.
{% endif %} {% if not package.review_thread and (package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW")) %}
Open Thread {{ _("Package review thread") }}: {{ _("You can open a thread if you have a question for the reviewer or package author.") }}
{% endif %} {% endmacro %}