{% extends 'critiques/critiques-header.inc.html.twig' %}
{% block content %}
{% include 'includes/navigation.inc.html.twig' %}
<main class="tc-desktop-2_3 tc-phone-1_1">
<section class="tc-panel">
<div class="tc-panel-header">
<h2>Spectacles avec critiques</h2>
<h3>à l'affiche
{% if typestructure is defined and typestructure is not empty %}
dans les {{ typestructure.typestructure_pluriel }}
{% endif %}
{% if saison is defined and saison is not empty %}
sur la saison {{ saison }}
{% endif %}
{% if year is defined and year is not empty %}
en {{ year }}
{% endif %}
{% if days is defined and days is not empty %}
dans les {{ days_name }}
{% endif %}
{% if datestart is defined and dateend is defined and datestart is not empty and dateend is not empty %}
du {{ datestart|date('Y-m-d') }} au {{ dateend|date('Y-m-d') }}
{% endif %}
</h3>
</div>
<div class="tc-panel-body">
{% if spectacles is defined and spectacles %}
<div class="tc-masonry-container">
{% for idspectacle,spectacle in spectacles %}
<div class="tc-spectacles-tpl-a tc-tablet-1_2 tc-block ">
{% include 'spectacles/spectacle_titre.inc.html.twig' %}
</div>
{% endfor %}
</div>
{% else %}
<div class="tc-block">
<div class="tc-block-body">
<p>Il n'y a pas de résultat correspondant à cette recherche</p>
</div>
</div>
{% endif %}
</div>
<div class="tc-panel-footer">
{% if pagination.spectacle is defined and pagination.spectacle %}
<p><span class="tc-text-number">
{% if pagination.totalItems is defined and pagination.totalItems %}
{{ pagination.totalItems }}
{% else %}
{{ pagination.total }}
{% endif %}
</span> spectacles
{% if pagination.representation_spectacle is defined and pagination.representation_spectacle %}
- {{ pagination.total_dates }} représentations
{% endif %}
{% if pagination.critique_spectacle is defined and pagination.critique_spectacle %}
- {{ pagination.nb_total }} critiques
{% endif %}
</p>
{% endif %}
</div>
</section>
</main>
{% endblock %}