Files
Phraseanet/templates/web/prod/Tooltip/Basket.html.twig
2020-03-17 15:34:24 +04:00

45 lines
1.9 KiB
Twig

{% import 'common/thumbnail.html.twig' as thumbnail %}
{% extends 'prod/Tooltip/Tooltip.html.twig' %}
{% set title %} {{ basket.getName() }} {% endset %}
{% set width = 500 %}
{% set maxwidth = null %}
{% block content %}
<div class="noToolTipResize" style="margin:5px;width:{{ width - 40 }}px;height:auto !important;height:380px;max-height:380px;min-height:220px;position:relative;">
<span class="expiredDate">
{% if basket.getValidation() %}
{% set dateExpired = app['date-formatter'].getPrettyString(basket.getValidation().getExpires()) %}
{% if date(dateExpired) < date() %}
<span>{{ 'workzone:feedback:expiration-closed' | trans }} :</span>
{% else %}
<span>{{ 'workzone:feedback:expiration-open' | trans }} :</span>
{% endif %} {{ dateExpired }}
{% endif %}
</span>
<div style="margin:5px 0;max-height:160px;overflow:hidden;text-overflow:ellipsis;">
{{ basket.getDescription()|nl2br }}
</div>
<div style="margin:5px 0;font-style:italic;position:relative;width: 100%">
{% set nb_records = basket.getElements()|length %}
{% set date = app['date-formatter'].getPrettyString(basket.getUpdated()) %}
<div style="text-align:right">
{% trans with {'%nb_records%' : nb_records} %}%nb_records% records{% endtrans %}
- {{ 'prod:workzone:basket:creation-date' | trans }} : {{ date }}
</div>
<hr/>
<div style="position:relative;float:left;width:470px;">
{% for element in basket.getElements() %}
{% if loop.index <= 10 %}
<div style="margin:5px;position:relative;float:left;width:80px;height:80px;overflow:hidden;">
{{ thumbnail.format(element.getRecord(app).get_thumbnail(), 80, 80 , '', false, false) }}
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endblock %}