<div class="row yw-publication__show">
  <div class="col-sm-8">
    <div class="thumbnail">
      <div class="caption">
        {% if metas['publication-cover-image'] %}
          <img class="pull-right img-cover img-thumbnail" alt="" src="{{ metas['publication-cover-image'] | raw }}">
        {% endif %}

        <h3>{{ metas.publication.title }}</h3>

        <p class="clearfix">{{ metas.publication.description }}</p>

        <p class="text-muted">
          <small>
          {{ _t('PUBLICATION_MODE_%s' | format(metas['publication-mode'] | upper)) }},
          {% if metas['publication-mode'] == 'book' %}
            {{ metas['publication-book']['page-format'] }}
            {{ _t('PUBLICATION_EBOOK_ORIENTATION_%s' | format(metas['publication-book']['page-orientation']| upper)) }}
          {% elseif metas['publication-mode'] == 'fanzine' %}
            {{ _t('PUBLICATION_FANZINE_LAYOUT_%s' | format(metas['publication-fanzine']['layout'] | replace({'-': '_'}) | upper)) }}
            <img src="tools/publication/styles/fanzine-layouts/{{ metas['publication-fanzine']['layout'] }}.svg" alt="" class="fanzine-layout img-icon">
          {% endif %}
          </small>
        </p>
      </div>
    </div>
  </div>

  <div class="col-sm-4">
    <div class="btn-group-vertical" role="group" aria-label="">
      <a href="{{ url({ handler: 'pdf', tag: tag }) }}"  class="btn btn-primary">
        <i class="fas fa-book"></i>
        {{ _t('PUBLICATION_VIEW_PDF') }}
      </a>

      {% if hasWriteAccess %}
      <a href="{{ url({ handler: 'preview', tag: tag }) }}" class="btn btn-info btn-secondary">
        <i class="fas fa-book-reader"></i>
        {{ _t('PUBLICATION_PREVIEW') }}
      </a>
      {% endif %}

      <a href="{{ url({ handler: 'share', tag: tag }) }}" class="btn btn-info btn-secondary modalbox">
        <i class="fas fa-share-alt"></i>
        {{ _t('TEMPLATE_SHARE') }}
      </a>

      {% if hasDeleteAccess %}
      <a href="{{ url({ handler: 'deletepage', tag: tag }) }}" class="btn btn-danger link-deletepage modalbox">
        <i class="fas fa-trash"></i>
        {{ _t('TEMPLATE_DELETE') }}
      </a>
      {% endif %}
    </div>
  </div>
</div>
