{% extends "base.html" %} {% from '_upsell.html' import crown_badge, max_badge, beta_pill %} {% block title %}{{ _("Ratings") }}{% endblock %} {% block content %}
{% if upsell is defined and upsell %}
star

{{ _("Ratings — MAX plan") }}{{ max_badge() }}

{% trans %}Import and manage PrestaShop Addons reviews. Available on the MAX plan.{% endtrans %}

{% else %} {# Header #}

{{ _("Ratings") }}

{{ _("Module reviews imported from PrestaShop Addons.") }} {% if total %}{% trans count=total %}{{ count }} review{% pluralize %}{{ count }} reviews{% endtrans %}{% endif %}

{% if total %} {% if has_feature('ratings_export') %} download {{ _("Export CSV") }} {% else %} {% endif %} {% endif %} upload {{ _("Import Reviews") }}
{% if total %} {# Product filter #}
{# Ratings table #}
{% for r in ratings %} {% endfor %}
{{ _("Product") }} {{ _("Customer") }} {{ _("Grade") }}
{{ r.product_name or (_("Product #%(id)s", id=r.product_id)) }} {{ r.customer_name or '—' }} {% set grade = r.star_rating if r.star_rating else (r.score_average | round(0) | int if r.score_average else none) %} {% if grade %} {% for i in range(1, 6) %} star {% endfor %} {% else %} {% endif %}
{% else %}
star

{{ _("No ratings imported yet.") }}

{{ _("Use the Import tool to paste reviews from the Addons marketplace.") }}

upload {{ _("Go to Import") }}
{% endif %}
{% endif %} {% endblock %}