Files
Phraseanet/templates/web/prod/preview/reg_train.html.twig
Romain Neutron 280e8b6178 Merge branch '3.8'
Conflicts:
	templates/web/client/baskets.html.twig
	templates/web/client/index.html.twig
	templates/web/prod/preview/basket_train.html.twig
	templates/web/prod/preview/feed_train.html.twig
	templates/web/prod/preview/reg_train.html.twig
2014-02-05 18:35:44 +01:00

67 lines
2.6 KiB
Twig

{% set regroupement = record.get_container() %}
{% set thumbnail = regroupement.get_thumbnail() %}
{% if thumbnail.get_height() > 0 %}
{% set ratio = thumbnail.get_width() / thumbnail.get_height() %}
{% else %}
{% set ratio = 1 %}
{% endif %}
{% if thumbnail.is_paysage %}
{% set style = 'width:80px;top:' %}
{% set top = (8 + (80 - (80 / ratio)) / 2)|round %}
{% set style = style ~ top %}
{% set style = style ~ 'px;' %}
{% else %}
{% set style = 'height:80px;top:8px;' %}
{% endif %}
<div id="PREVMAINREG" class="PNB10">
<img onclick="openPreview('REG',0,'{{regroupement.get_serialize_key()}}')"
src="{{thumbnail.get_url()}}" style="position:relative;{{style}}" />
</div>
<div id="PREVIEWCURRENTCONT" class="PNB10 group_case">
<ul>
{% for contained in record.get_train %}
{% set thumbnail = contained.get_thumbnail() %}
{% if thumbnail.is_paysage %}
{% set style = 'width:65px;top:' %}
{% set top = ((66 - (65 / (thumbnail.get_width() / thumbnail.get_height()))) / 2)|round %}
{% set style = style ~ top %}
{% set style = style ~ 'px;' %}
{% else %}
{% set style = 'height:65px;top:8px;' %}
{% endif %}
{% set tooltip = '' %}
{% if app['conf'].get(['registry', 'classic', 'stories-preview']) %}
{% set tooltip = path('prod_tooltip_caption', { 'sbas_id' : contained.get_sbas_id(), 'record_id' : contained.get_record_id(), 'context' : 'preview', 'number' : contained.get_number() }) %}
{% endif %}
{% set class = '' %}
{% if loop.index == record.get_number() %}
{% set class = ' selected' %}
{% endif %}
<li class="{{class}} prevTrainCurrent" style="">
<img {% if tooltip %}tooltipsrc="{{ tooltip }}"{% endif %} jsargs="REG|{{loop.index}}|{{regroupement.get_serialize_key}}"
class="openPreview prevRegToolTip" src="{{thumbnail.get_url()}}"
style="{{style}}margin:7px;position:relative;"/></li>
{% endfor %}
</ul>
</div>
<div class="cont_infos">
<div>
<img src="/skins/icons/light_left.gif" style="margin-right:10px;" onclick="getPrevious();"/>
<img src="/skins/icons/light_right.gif" style="margin-left:10px;" onclick="getNext();"/><br/>
<span onclick="startSlide()" id="start_slide">{{ 'preview:: demarrer le diaporama' | trans }}</span>
<span onclick="stopSlide()" id="stop_slide">{{ 'preview:: arreter le diaporama' | trans }}</span>
</div>
</div>
<div id="PREVIEWTOOL">
{% include 'prod/preview/tools.html.twig' %}
</div>