{% extends "Layout/default.html.twig" %}
{% block navigation %}
{{ include('Press/Includes/pressHeader.html.twig') }}
{% endblock %}
{% set assetVideoEditable = getVideoEditable(assetVideoObject, videoObject.posterimage) %}
{% block content %}
{% set detailUrl = linkGenerator().generate(videoObject) %}
{% do elements_canonical(detailUrl) %}
{% if videoObject.posterimage %}
{% do elements_opengraph().addImage(videoObject.posterimage) %}
{% endif %}
{% do elements_head_title().setTitle(title|default(''), true) %}
{% if videoObject.description %}
{% do elements_opengraph().setDescription(videoObject.description) %}
{% do elements_head_meta().setDescription(videoObject.description, true) %}
{% elseif videoObject.video is instanceof('\\Pimcore\\Model\\Asset') and videoObject.video.metadata('General.description', app.request.locale) %}
{% do elements_opengraph().setDescription(videoObject.video.metadata('General.description', app.request.locale)) %}
{% do elements_head_meta().setDescription(videoObject.video.metadata('General.description', app.request.locale), true) %}
{% endif %}
{% do pimcore_placeholder('addBreadcrumb').set({
'parentId' : document.getId(),
'url' : app.request.pathInfo,
'label' : title|default('')
}) %}
{{ include('Navigation/breadcrumb.html.twig') }}
<div class="container container-sm content-block">
{% if isYoutube %}
<div class="embed-responsive embed-responsive-16by9">
{{ assetVideoEditable|raw }}
</div>
{% else %}
<div class="video-overlay__wrapper js-play-video">
<div class="video-overlay embed-responsive embed-responsive-16by9 js-play-video__overlay">
<span class="icon icon-play video-overlay__icon" title="play" aria-label="play"></span>
{% if videoObject.posterimage %}
<img src="{{ videoObject.posterimage.thumbnail('video-overlay')|raw }}"
class="js-lazy-img embed-responsive-item teaser-animation__img">
{% endif %}
<img src="{{ assetVideoObject.poster("video-overlay") }}"
class="js-lazy-img embed-responsive-item teaser-animation__img">
</div>
<div class="video-overlay__video embed-responsive embed-responsive-16by9">
{# {% if isYoutube %}#}
{# {{ assetVideoEditable|raw }}#}
{# {% else %}#}
{{ assetVideoEditable|raw }}
{# {% endif %}#}
</div>
</div>
{% endif %}
<form class="mt-4 js-form-validation js-action-changer" data-action="{{ not isYoutube ? path('download-press-video', {assetId: assetVideoObject.data.id}) : '#' }} " action="/404">
{% if number|default(null) %}
<div class="badge badge-primary">
{{ 'general.Nr'|trans }}. {{ number }}
</div>
{% endif %}
<h1 class="h3 text-primary mt-3">{{ title|default('') }}</h1>
{% if copyright|default(null) %}
<div class="text-priamry my-3">
© {{ copyright.text }}
</div>
{% endif %}
{% if not isYoutube %}
<div class="text-primary">
<div><strong>{{ 'mediaimage.Auflösung'|trans }}:</strong> {{ assetVideoObject.data.width }} x {{ assetVideoObject.data.height }}</div>
<div><strong>{{ 'mediaimage.Format'|trans }}:</strong> {{ getImageType(assetVideoObject.data) }}</div>
<div>{{ 'mediaimage.Darf nur für Presse-Zwecke verwendet werden.'|trans }}</div>
</div>
<div class="mt-4">
{{ include('Form/Includes/checkbox.html.twig', {
name: 'gdpr',
id: 'gdpr',
required: true,
label: 'mediaimage.Ich akzeptiere die <button class="btn-no-styling text-underline" data-toggle="modal" data-target="#usageGuidelines">Verwendungsrichtlinien</button>'|trans
}) }}
</div>
<div class="row vertical-gutter--2">
<div class="col-md-5 vertical-gutter__item">
{% set user = getMediaUser(app.request) %}
{% if user or elements_debug_mode() %}
<button class="btn btn-primary-light btn-block" type="submit" data-event-tracking-category="Multimedia Archiv - Download" data-event-tracking-action="Video" data-event-tracking-label="{{ title|default('') }} {{ videoObject.id }}">
<span class="icon icon-download btn-icon" aria-hidden="true"></span>
{{ 'mediaimage.Download'|trans }}
</button>
{% else %}
<a class="btn btn-primary-light btn-block js-nav__show-overlay"
aria-label="Show Overlay"
title="Show Overlay"
data-nav-overlay-target="#loginOverlay">
<span class="icon icon-download btn-icon" aria-hidden="true"></span>
{{ 'mediaimage.Für download einloggen'|trans }}
</a>
{% endif %}
</div>
</div>
{% endif %}
</form>
</div>
{% endblock %}
{% block usageGuidlines %}
{{ include('Press/Includes/userGuidelinesModal.html.twig', {regions: not videoObject.regions is empty ? videoObject.regions : [getMainRegion()]}) }}
{% endblock %}
{% block javascripts %}
{% if not app.request.get('onlyInlineCss') %}
{{ include('Layout/includes/encore.html.twig', {
'staticDebugMode': staticDebugMode,
'file': 'js/press'
}) }}
{% endif %}
{% endblock %}