{# The front of the detail page content is in details.html. We want the above-the-fold portion to return and render really fast so we pull in reviews and links to other add-ons with js. This view returns a chunk of HTML that's injected into the DOM. #} {% set amo_user = request.amo_user if request.user.is_authenticated() else None %} {% set version = addon.current_version %} {% set reviews = reviews[:3] %}

{{ _('Reviews') }}

{{ impala_review_list_box(addon=addon, reviews=reviews) }}
{# Cache all of this against the addon because the data doesn't change much and it all depends on the addon in some way. #} {% cache addon %} {% if recommendations or collections or author_addons %}
{% if recommendations %}

{{ _('Often used with…')|safe }}

{{ recommendations|addon_grid(cols=3, src='dp-hc-oftenusedwith', dl_src='dp-dl-oftenusedwith') }}
{% endif %} {% if collections %}

{{ _('Part of these Collections') }}

{{ collections|collection_grid(cols=3) }}
{% endif %} {% if author_addons %}

{% with count=addon.listed_authors|length, author=users_list(addon.listed_authors) %} {% if addon.is_webapp() %} {% trans count=count %} Other apps by {{ author }} {% pluralize %} Other apps by these authors {% endtrans %} {% else %} {% trans count=count %} Other add-ons by {{ author }} {% pluralize %} Other add-ons by these authors {% endtrans %} {% endif %} {% endwith %}

{{ author_addons|addon_grid(cols=3, src='dp-hc-othersby', dl_src='dp-dl-othersby') }}
{% endif %}
{% endif %} {% endcache %} {# cache addon #}