{% extends "base.html.twig" %}
{% block pageTitle %} {{ cat | title }} - {{ titolo }} {% endblock %}
{% block pageStyle %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('js/tobii/tobii.min.css') }}">
{% endblock %}
{% block pageScriptsHeader %}
{{ parent() }}
<script src="{{ asset('js/tobii/tobii.min.js') }}"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const tobii = new Tobii();
});
</script>
{% endblock %}
{% block navigation %} {{ parent() }} {% endblock %}
{% block upperMainContainer %}
{% endblock %}
{% set hasBrochures, hasManifesti, hasVernice, hasAllestimento, hasAltro, hasPubblicazioni, hasGiornali = 0, 0, 0, 0, 0, 0, 0 %}
{% if mostra.iddocumento is defined and mostra.iddocumento | length > 0 %}
{% set hasPubblicazioni = 1 %}
{% endif %}
{% if mostra.idarticolo is defined and mostra.idarticolo | length > 0 %}
{% set hasGiornali = 1 %}
{% endif %}
{% block mainContainer %}
<div class="container cortelazzo-font-regular">
<!-- All data -->
<div class="row">
<div class="col-xl-12">
<span><a href="{{ path("showMostra") }}">Torna alle esposizioni</a></span>{% if app.user %} | <span><a href="{{ path("adminModifyMostra", {idmostra: mostra.id}) }}">Modifica esposizione</a></span>{% endif %}
</div>
<div class="col-xl-12 mb-1 mt-3">
<p class="h1 cortelazzo-titles cortelazzo-font-bold">{{ titolo }}</p>
</div>
</div>
<nav class="row navbar-expand-lg navbar-light bg-white">
<div class="col-xl-12 navbar">
<ul class="navbar-nav">
{% if opere is defined and opere is not empty %}
<li class="nav-item {% if app.request.get('_route') == "opereMostra" %} active {% endif %}">
<a class="nav-link" href="{{ path("opereMostra", {"idmostra" : mostra.id}) }}" role="button" class="nav-link">{{ 'opere' | upper }}</a>
</li>
{% endif %}
{% if mostra.getVideos() is not empty %}
<li class="nav-item {% if app.request.get('_route') == "videoMostra" %} active {% endif %}">
<a class="nav-link" href="{{ path("videoMostra", {"idmostra" : mostra.id}) }}" role="button" class="nav-link">{{ 'video' | upper }}</a>
</li>
{% endif %}
{% if mostra.multimedias is not empty %}
{% for multimedia in mostra.multimedias %}
{% if multimedia.tipo == 'brochure' %}
{% set hasBrochures = 1 %}
{% elseif multimedia.tipo == 'manifesto' %}
{% set hasManifesti = 1 %}
{% elseif multimedia.tipo == 'vernice' %}
{% set hasVernice = 1 %}
{% elseif multimedia.tipo == 'allestimento' %}
{% set hasAllestimento = 1 %}
{% elseif multimedia.tipo == 'altro' %}
{% set hasAltro = 1 %}
{% endif %}
{% endfor %}
{% if hasAllestimento %}
<li class="nav-item {% if app.request.get('_route') == "allestimentoMostra" %} active {% endif %}">
<a class="nav-link pl-0" href="{{ path("allestimentoMostra", {"idmostra" : mostra.id}) }}" role="button" class="nav-link">{{ 'Allestimento' | upper }}</a>
</li>
{% endif %}
{% if hasBrochures %}
<li class="nav-item {% if app.request.get('_route') == "brochureMostra" %} active {% endif %}">
<a class="nav-link pl-0" href="{{ path("brochureMostra", {"idmostra" : mostra.id}) }}" role="button" class="nav-link">{{ 'catalogo' | upper }}</a>
</li>
{% endif %}
{% if hasManifesti %}
<li class="nav-item {% if app.request.get('_route') == "manifestoMostra" %} active {% endif %}">
<a class="nav-link" href="{{ path("manifestoMostra", {"idmostra" : mostra.id}) }}" role="button" class="nav-link">{{ 'manifesto' | upper }}</a>
</li>
{% endif %}
{% if hasVernice %}
<li class="nav-item {% if app.request.get('_route') == "verniceMostra" %} active {% endif %}">
<a class="nav-link" href="{{ path("verniceMostra", {"idmostra" : mostra.id}) }}" role="button" class="nav-link">{{ 'vernice' | upper }}</a>
</li>
{% endif %}
{% if hasAltro %}
<li class="nav-item {% if app.request.get('_route') == "altroMostra" %} active {% endif %}">
<a class="nav-link" href="{{ path("altroMostra", {"idmostra" : mostra.id}) }}" role="button" class="nav-link">{{ 'altro' | upper }}</a>
</li>
{% endif %}
{% if hasPubblicazioni %}
<li class="nav-item {% if app.request.get('_route') == "pubblicazioniMostra" %} active {% endif %}">
<a class="nav-link" href="{{ path("pubblicazioniMostra", {"idmostra" : mostra.id}) }}" role="button">{{ 'pubblicazioni' | upper }}</a>
</li>
{% endif %}
{% if hasGiornali %}
<li class="nav-item {% if app.request.get('_route') == "giornaliMostra" %} active {% endif %}">
<a class="nav-link" href="{{ path("giornaliMostra", {"idmostra" : mostra.id}) }}" role="button">{{ 'giornali' | upper }}</a>
</li>
{% endif %}
{% endif %}
</ul>
</div>
</nav>
<div class="row">
<div class="col-xl-12">
<hr/>
</div>
</div>
{% if app.request.get('_route') == "opereMostra" %}
<div class="row" id="image-container">
{% for opera in opere %}
{% if not cover_presence[opera.id] %}
{% for m in opera.multimedias | slice(0, 1) %}
{% if m.multimedia.tipo == "image" %}
<div class="col-xl-3 card-item" data-idcard="{{ opera.id }}" >
<a class="hover-underline-removal" href="{{ path("archivio-opere-scheda", {"idopera": opera.id}) }}">
<img class="card-img-top card-img-top-custom" src="{{ asset(uploaded_img_normal ~ m.multimedia.fileref ~ '.' ~ m.multimedia.estensione) }}" alt="{{ m.multimedia.nome }}">
<div class="card-body card-body-custom">
<h5 class="card-title">{{ opera.titolo | replace({"<": "(", ">": ")"}) }}</h5>
</div>
</a>
</div>
{% endif %}
{% endfor %}
{% else %}
{% for m in opera.multimedias %}
{% if m.multimedia.tipo == "image" and m.cover %}
<div class="col-xl-3 card-item" data-idcard="{{ opera.id }}" >
<a class="hover-underline-removal" href="{{ path("archivio-opere-scheda", {"idopera": opera.id}) }}">
<img class="card-img-top card-img-top-custom" src="{{ asset(uploaded_img_normal ~ m.multimedia.fileref ~ '.' ~ m.multimedia.estensione) }}" alt="{{ m.multimedia.nome }}">
<div class="card-body card-body-custom">
<h5 class="card-title">{{ opera.titolo | replace({"<": "(", ">": ")"}) }}</h5>
</div>
</a>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
{% elseif app.request.get('_route') == "videoMostra" %}
<div class="row mt-3">
{% set count = 0 %}
{% for video in mostra.videos %}
<figure class='col-xl-2'>
<a href="{{ video.url }}" target="_blank">
<img class="img-fluid" src="{{ asset("administrator/img/glyphicons-152-new-window@3x.png") }}" />
</a>
<figcaption class="mt-2" itemprop="caption description">{{ video.titolo }}</figcaption>
</figure>
{% endfor %}
</div>
{% elseif app.request.get('_route') == "giornaliMostra" %}
{% if mostra.idarticolo is defined and mostra.idarticolo | length > 0 %}
<div class="col-xl-12 mb-3 mt-3">
<h3>Giornali correlati</h3>
</div>
<ul>
{% for giornale in mostra.idarticolo|sort((a, b) => a.anno <=> b.anno) %}
<li class="bibliografia-item giornale">
{% if giornale.getAutore() is not empty and giornale.getTitolo() is not empty %}
<p class="mt-0 mb-0">
{% if giornale.getAutore() is not empty %}
{{ giornale.getAutore() }}
{% endif %}
{% if giornale.getAutore() is not empty and giornale.getTitolo() is not empty %}
-
{% endif %}
{% if giornale.getTitolo() is not empty %}
{{ giornale.getTitolo() }}
{% endif %}
</p>
{% endif %}
<p class="mt-0 mb-0">
{% if giornale.getIdgiornale() is defined and giornale.getIdgiornale().getNome() is not empty %}
{{ giornale.getIdgiornale().getNome() }} -
{% endif %}
{% if giornale.getPagina() is not empty %}
pag. {{ giornale.getPagina() }}
{% endif %}
({{ giornale.getGiorno() }}-{{ giornale.getMese() }}-{{ giornale.getAnno() }})
{% if giornale.multimediafiles is not empty %}
{% for multimedia in giornale.multimediafiles | slice(0, 1) %}
- <a href="{{ asset(uploaded_img_big ~ multimedia.fileref ~ '.' ~ multimedia.estensione) }}" itemprop="contentUrl" data-size="{{ multimedia.widthbig }}x{{ multimedia.heightbig }}">IMG</a>
{% endfor %}
{% endif %}
</p>
</li>
{% endfor %}
</ul>
{% endif %}
{% elseif app.request.get('_route') == "pubblicazioniMostra" %}
{% if mostra.iddocumento is defined and mostra.iddocumento | length > 0 %}
<div class="col-xl-12 mb-3 mt-3">
<h3>Pubblicazioni correlate</h3>
</div>
<ul>
{% for documento in mostra.iddocumento|sort((a, b) => a.anno <=> b.anno) %}
<li>
<p class="mt-0 mb-0">
<a href="{{ path('documentoMonografieCataloghi', {'iddocumento': documento.id}) }}">
{{ documento.titolo }}
</a>
{% if documento.getAutore() %} di {{ documento.getAutore() }}
{% endif %}
</p>
<p class="mt-0 mb-0">
{% if documento.getLuogo() is defined and documento.getLuogo() is not empty %}
{{ documento.getLuogo() }} -
{% endif %}
({{ documento.getAnno() }})
{% if documento.file is not empty %}
<a href="{{ asset(uploaded_documents ~ documento.file.fileref|replace({'-':''}) ~ '.' ~ documento.file.estensione) }}">
PDF
</a>
{% endif %}
</p>
</li>
{% endfor %}
</ul>
{% endif %}
{% else %}
<div class="row mt-3" itemscope itemtype="http://schema.org/ImageGallery">
{% set count = 0 %}
{% if allestimento is defined %}
{% for immagine in allestimento %}
<figure class="col-xl-2 card-item" itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<a href="{{ asset(uploaded_img_big ~ immagine.fileref ~ '.' ~ immagine.estensione) }}" itemprop="contentUrl" data-size="{{ immagine.widthbig }}x{{ immagine.heightbig }}" class="lightbox">
<img class="card-img-top card-img-top-custom" src="{{ asset(uploaded_img_thumbnail ~ immagine.fileref ~ '.' ~ immagine.estensione) }}" alt="{{ immagine.nome }}">
</a>
{% if immagine.nome is not empty %}
<figcaption>{{ immagine.descrizione }}</figcaption>
{% endif %}
</figure>
{% endfor %}
{% endif %}
{# {% for m in mostra.multimedias %}
{% if m.tipo == cat %}
{% if m.multimedia.tipo == 'image' %}
<figure class="col-xl-2 card-item" itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<a href="{{ asset(uploaded_img_big ~ m.multimedia.fileref ~ '.' ~ m.multimedia.estensione) }}" itemprop="contentUrl" data-size="{{ m.multimedia.widthbig }}x{{ m.multimedia.heightbig }}">
<img class="card-img-top card-img-top-custom" src="{{ asset(uploaded_img_thumbnail ~ m.multimedia.fileref ~ '.' ~ m.multimedia.estensione) }}" alt="{{ m.multimedia.nome }}">
</a>
{% if m.multimedia.nome is not empty %}
<figcaption>{{ m.multimedia.descrizione }}</figcaption>
{% endif %}
</figure>
{% set count = count + 1 %}
{% endif %}
{% endif %}
{% endfor %} #}
</div>
<div class="row my-gallery mt-3">
{% for m in mostra.multimedias %}
{% if m.tipo == cat %}
{% if m.multimedia.tipo == 'document' %}
<figure class='col-xl-2'>
<a href="{{ asset(uploaded_documents ~ m.multimedia.fileref ~ '.' ~ m.multimedia.estensione) }}">
<img class="img-fluid" src="{{ asset('administrator/img/glyphicons-filetypes-65-pdf@3x.png') }}" />
</a>
<figcaption class="mt-2" itemprop="caption description">{{ m.multimedia.nome }}</figcaption>
</figure>
{% set count = count + 1 %}
{% endif %}
{% if m.multimedia.tipo == 'image' and app.request.get('_route') != "allestimentoMostra" %}
<figure class="col-xl-2" itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<a href="{{ asset(uploaded_img_big ~ m.multimedia.fileref ~ '.' ~ m.multimedia.estensione) }}" itemprop="contentUrl" data-size="{{ m.multimedia.widthnormal }}x{{ m.multimedia.heightnormal }}" class="lightbox">
<img src="{{ asset(uploaded_img_thumbnail ~ m.multimedia.fileref ~ '.' ~ m.multimedia.estensione) }}" itemprop="thumbnail" alt="{{ m.multimedia.nome }}" />
</a>
<figcaption itemprop="caption description">{{ m.multimedia.nome|replace({'_': ' '}) }}</figcaption>
</figure>
{% set count = count + 1 %}
{% endif %}
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% endblock %}