{% from "addons/macros.html" import price, refund_info %} {% set amo_user = request.amo_user if request.user.is_authenticated() else None %} {% for addon in addons %} {% if show_refunds %} {% set contribs = waffle.switch('marketplace') and contributions.get(addon.pk) %} {% endif %} {% set is_refunded = contribs and addon.is_refunded(request.amo_user) %} {% set is_chargeback = contribs and addon.is_chargeback(request.amo_user) %}
  • {% set dl_url = addon.get_url_path() %} {% if src %} {% set dl_url = dl_url|urlparams(src=src) %} {% endif %}

    {{ addon.name }}

    {{ addon.summary|striptags|truncate(200) }}
    {% with num=addon.total_reviews %} {% if num %} {{ addon.average_rating|float|stars }} {% else %} {{ _('Not Yet Rated') }} {% endif %} {% endwith %} {{ price(addon) }} {% if sort in ('downloads', 'popular') or not addon.show_adu() %} {% with num=addon.weekly_downloads %} {# L10n: {0} is the number of downloads. #} {{ ngettext("{0} weekly download", "{0} weekly downloads", num)|f(num|numberfmt)|safe }} {% endwith %} {% elif sort == 'users' or addon.show_adu() %} {% with num=addon.average_daily_users %} {# L10n: {0} is the number of users. #} {{ ngettext("{0} user", "{0} users", num)|f(num|numberfmt)|safe }} {% endwith %} {% endif %} {% if sort in ('newest', 'created') %} {{ _('Added {0}')|f(addon.created|datetime) }} {% elif sort == 'updated' %} {{ _('Updated {0}')|f(addon.last_updated|datetime) }} {% endif %} {% if contribs %} {{ refund_info(amo, addon, contributions) }} {% endif %}
    {% if is_refunded %}
    {% if is_refunded %} {{ _('Purchase Refunded') }} {% endif %}
    {% endif %} {% if src == 'search' %} {{ mobile_install_button(addon, show_warning=False) }} {% endif %}
  • {% endfor %}