{% macro sort_vital(addon, field) %} {% if field not in ('created', 'updated') %} {{ addon|weekly_downloads }} {% endif %} {% if field in ('created', 'updated') %} {% if field == 'created' %} {# L10n: {0} is a date. #} {{ _('Added {0}')|f(addon.created|datetime) }} {% else %} {# L10n: {0} is a date. #} {{ _('Updated {0}')|f(addon.last_updated|datetime) }} {% endif %} {% endif %} {% endmacro %}

{% set dl_url = product.get_url_path() %} {% if dl_src %} {% set dl_url = dl_url|urlparams(src=dl_src) %} {% endif %} {{ product.name }}

{{ product.summary|nl2br }}

{{ product.get_price() }} {% with cats = product.all_categories %} {% if cats %} {% for cat in cats %} {{ cat }} {%- if not loop.last %},{% endif %} {% endfor %} {% endif %} {% endwith %} {{ impala_reviews_link(product) }} {{ sort_vital(product, 'downloads') }} {% if field in ('created', 'updated') %} {{ sort_vital(product, field) }} {% endif %}