 <div id="PREVIEWCURRENTCONT" class="PNB10">
  <ul>
    {% set entry = record.get_container() %}
    {% for item in entry.items %}
        {% set record_item = item.record(app) %}

        {% set thumb_w = 70 %}
        {% set thumb_h = 70 %}

        {% set thumbnail = record_item.get_thumbnail %}

        {% if thumbnail is not none %}
            {% set thumb_w = thumbnail.get_width %}
            {% set thumb_h = thumbnail.get_height %}
        {% endif %}

        {% set url = record_thumbnail_url(record_item) %}

        {% set box_w = 70 %}
        {% set box_h = 80 %}

        {% set original_h = thumb_h > 0 ? thumb_h : 70 %}
        {% set original_w = thumb_w > 0 ? thumb_w : 70 %}

        {% set fit_size = fitIn(
                {"width":original_w, "height":original_h},
                {"width":box_w, "height":box_h}
            )
        %}

      <li class="{% if record.getNumber == item.ord %}selected{% endif %} prevTrainCurrent">
        <img {% if app['conf'].get(['registry', 'classic', 'stories-preview']) %}
                tooltipsrc="{{ path('prod_tooltip_preview', { 'sbas_id' :record_item.databoxId, 'record_id' : record_item.recordId }) }}"
              {% endif %}
              jsargs="FEED|{{item.ord}}|{{entry.id}}"
              class="openPreview prevRegToolTip" src="{{url}}"
              style="
                  width:{{fit_size.width}}px;
                  height:{{fit_size.height}}px;
                  top:{{fit_size.top}}px;
                  position:relative;
              "
        /></li>
    {% endfor %}

   </ul>
  </div>
 <div class="wrapper_diaspo">
   <div class="cont_infos">
     <div>
         <button onclick="getPrevious();">
             <i class="icon-caret-left"></i>
         </button>
         <button onclick="getNext();">
             <i class="icon-caret-right"></i>
         </button><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>
 </div>
