{% set nb_basket_elements = selected_basket_elements.count() %}
{% if selected_basket is not none %} {{ selected_basket.getName() }} : {% trans %} paniers:: {{ nb_basket_elements }} documents dans le panier {% endtrans %} {% if app['phraseanet.registry'].get('GV_viewSizeBaket') %} ({{ selected_basket.getSize(app) }} Mo) {% endif %} {% endif %}
{% if total_baskets > 0 %} {% endif %} {% if total_baskets > 0 %}
{% endif %}
{% if total_baskets > 0 and (app['authentication'].getUser().ACL().has_right("candwnldhd") or app['authentication'].getUser().ACL().has_right("candwnldpreview") or app['authentication'].getUser().ACL().has_right("cancmd") > 0) %}
{% endif %} {% if total_baskets > 0%}
{% endif %} {% if total_baskets > 0 %}
{% endif %}
{% if selected_basket is not none and selected_basket.getPusher(app) is not none %} {% set pusher_name = selected_basket.getPusher(app).get_display_name() %}
{% trans %} paniers:: panier emis par {{ pusher_name }} {% endtrans %}
{% endif %} {% for element in selected_basket_elements %} {% set record = element.getRecord(app) %} {% set thumbnail = record.get_thumbnail() %} {% if thumbnail.get_width() > thumbnail.get_height() %} {# paysage #} {% if thumbnail.get_width() > 67 %} {% set width = 67 %} {% set top = ((67 - (67 * thumbnail.get_height() / thumbnail.get_width())) / 2)|round(0, constant('PHP_ROUND_HALF_UP')) %} {% else %} {% set width = thumbnail.get_width() %} {% set top = ((67 - thumbnail.get_height()) / 2)|round(0, constant('PHP_ROUND_HALF_UP')) %} {% endif %} {% set dim = "width:" ~ width ~ "px" %} {% else %} {# portrait #} {% if thumbnail.get_height() > 55 %} {% set height = 55 %} {% set top = ((67 - 55) / 2)|round(0, constant('PHP_ROUND_HALF_UP')) %} {% else %} {% set height = thumbnail.get_height() %} {% set top = ((67 - thumbnail.get_height()) / 2)|round(0, constant('PHP_ROUND_HALF_UP')) %} {% endif %} {% set dim = "height:" ~ height ~ "px" %} {% endif %} {% set tooltip = '' %} {% if app['phraseanet.registry'].get('GV_rollover_chu') %} {% set tooltip = 'tooltipsrc="/prod/tooltip/caption/' ~ record.get_sbas_id() ~ '/' ~ record.get_record_id() ~ '/basket/"' %} {% endif %}
{% if app['authentication'].getUser().ACL().has_right_on_base(record.get_base_id(), 'candwnldhd') or app['authentication'].getUser().ACL().has_right_on_base(record.get_base_id(), 'candwnldpreview') or app['authentication'].getUser().ACL().has_right_on_base(record.get_base_id(), 'cancmd') or app['authentication'].getUser().ACL().has_preview_grant(record) %}
{% endif %}
{% endfor %}