    {% set story = record.get_container %}

    {% set thumb_w = 90 %}
    {% set thumb_h = 90 %}

    {% set thumbnail = story.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(story) %}

    {% set box_w = 90 %}
    {% set box_h = 96 %}

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

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

  <div id="PREVMAINREG" class="PNB10">
  <img onclick="openPreview(this, 'REG',0,'{{story.get_serialize_key}}')"
       src="{{url}}"
       style="
          width:{{fit_size.width}}px;
          height:{{fit_size.height}}px;
          top:{{fit_size.top}}px;
          position:relative;
      " />
  </div>


  <div id="PREVIEWCURRENTCONT" class="PNB10 group_case">
  <ul>
      {% for record_item in record.get_train %}
          {% 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 loop.index == record.getNumber %}selected{% endif %} prevTrainCurrent" style="">
        <img {% if app['conf'].get(['registry', 'classic', 'stories-preview']) %}tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : record_item.databoxId, 'record_id' : record_item.recordId, 'context' : 'preview', 'number' : record_item.getNumber }) }}"{% endif %}
             jsargs="REG|{{loop.index}}|{{story.get_serialize_key}}"
            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>
