{% extends "Layout/default.html.twig" %}
{% block navigation %}
{{ include('Press/Includes/pressHeader.html.twig') }}
{% endblock %}
{% block content %}
{% set detailUrl = getMediaArchiveImageDetail(asset, siteConfig) %}
{% do elements_canonical(detailUrl) %}
{% do elements_opengraph().addImage(asset) %}
{% do elements_head_title().setTitle(asset.metadata('General.title', app.request.locale), true) %}
{% if asset.metadata('General.description', app.request.locale) %}
{% do elements_opengraph().setDescription(asset.metadata('General.description', app.request.locale)) %}
{% do elements_head_meta().setDescription(asset.metadata('General.description', app.request.locale), true) %}
{% endif %}
{% do pimcore_placeholder('addBreadcrumb').set({
'parentId' : document.getId(),
'url' : app.request.pathInfo,
'label' : asset.metadata('General.title', app.request.locale) ?: ('press-image-detail.number'|trans ~ ' ' ~(asset.metadata('General.number') ?: asset.id))
}) %}
{{ include('Navigation/breadcrumb.html.twig') }}
<div class="container container-sm content-block">
<a href="{{ document }}{{ app.request.queryString ? ('?' ~ app.request.queryString ) : '' }}" class="btn btn-primary-light mb-2" >
{{ 'mediaimage.back to overview'|trans }}
</a>
<div class="embed-responsive-16by9 embed-responsive">
{% set description = getImageDescription(asset, true) %}
{{ asset.thumbnail('press-picture-watermark').html({
imgAttributes: {
class: 'js-lazy-img embed-responsive-item',
title: description|default(''),
alt: description|default('')
},
lowQualityPlaceholder: true
})|raw }}
</div>
<form action="{{ path('download-press-image', {assetId: asset.id}) }}" >
<div class="mt-4">
<div class="badge badge-primary">
{{ 'general.Nr'|trans }}. {{ asset.metadata('General.number') }}
</div>
<h1 class="h3 text-primary mt-3">{{ asset.metadata('General.title', app.request.locale) }}</h1>
{% set imageTexts = getImageTexts(asset) %}
{% if imageTexts.copyright|default(false) or imageTexts.author|default(false) %}
<div class="text-priamry my-3">
{% if imageTexts.copyright|default(false) %}
{{ imageTexts.copyright }}
{% endif %}
{% if imageTexts.copyright|default(false) and imageTexts.author|default(false) %}
|
{% endif %}
{% if imageTexts.author|default(false) %}
{{ imageTexts.author }}
{% endif %}
</div>
{% endif %}
<div class="text-primary">
<div><strong>{{ 'mediaimage.Auflösung'|trans }}:</strong> {{ asset.width }} x {{ asset.height }}</div>
<div><strong>{{ 'mediaimage.Format'|trans }}:</strong> {{ getImageType(asset) }}</div>
{% if asset.property('ulicense_object') is instanceof('\\Pimcore\\Model\\DataObject\\ULicense') %}
<div>
<strong>{{ 'mediaimage.Lizenz'|trans }}:</strong> {{ asset.property('ulicense_object').code }} - {{ asset.property('ulicense_object').name }} <span class="ml-2">{{ asset.property('ulicense_object').logoSmall ? asset.property('ulicense_object').logoSmall.thumbnail().html({height: 24})|raw : '' }}</span>
{% if asset.property('ulicense_object').description != '' %}
<button class="btn-info ml-2" title="{{ asset.property('ulicense_object').description }}" data-toggle="tooltip">i</button>
{% endif %}
</div>
{% endif %}
{% if imageTexts.usage|default(false) %}
<div><strong>{{ 'mediaimage.usage'|trans }}:</strong> {{ imageTexts.usage }}</div>
{% endif %}
</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="Bild" data-event-tracking-label="{{ asset.metadata('General.title', app.request.locale) }} {{ asset.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="{{ 'sr.Show Overlay'|trans }}"
title="{{ 'sr.Show Overlay'|trans }}"
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 class="col-md-5 vertical-gutter__item">
<button type="button" class="wishlist-btn--big btn btn-primary-light btn-block js-wishlist-press-pictures__btn
{{ asset.id in activePressPicturesWishlistIds ? 'is-active' }}"
data-wishlist-id="{{ asset.id }}"
data-wishlist-list-name="press-pictures"
aria-label="{{ 'press.Auf die Merkliste'|trans }}"
title="{{ 'press.Auf die Merkliste'|trans }}" data-event-tracking-category="Multimedia Archiv - Merkliste Detailseite" data-event-tracking-action="Bild{{ asset.id in activePressPicturesWishlistIds ? (' ' ~ 'press.entfernen'|trans) : '' }}" data-event-tracking-action-toggle=" {{ 'press.entfernen'|trans }}" data-event-tracking-label="{{ asset.metadata('General.title', app.request.locale) }} {{ asset.id }}">
<span class="icon icon-star btn-icon" aria-hidden="true"></span>
<span class="wishlist-btn__text-default">{{ 'press.Zur Merkliste hinzufügen'|trans }}</span>
<span class="wishlist-btn__text-active">{{ 'press.Von Merkliste entfernen'|trans }}</span>
</button>
</div>
</div>
</div>
</form>
</div>
{% endblock %}
{% block usageGuidlines %}
{{ include('Press/Includes/userGuidelinesModal.html.twig', {regions: not asset.metadata('General.regions') is empty ? asset.metadata('General.regions') : [getMainRegion()]}) }}
{% endblock %}
{% block javascripts %}
{% if not app.request.get('onlyInlineCss') %}
{{ include('Layout/includes/encore.html.twig', {
'staticDebugMode': staticDebugMode,
'file': 'js/press'
}) }}
{% endif %}
{% endblock %}