{% extends minHeader is defined ? 'minimum.html.twig' : 'templates.html.twig' %}
{% block content %}
<style type="text/css">
body { margin: 0!important; padding: 0!important; background: none!important; }
</style>
<div id="thnet_widget">
<section class="tc-panel tc-widget tc-tablet-1_2 tc-phone-1_1" style="width:100%;">
<div class="tc-panel-body" style="margin-top:0">
{% if date_exists is defined and date_exists %}
{% if schedule_detail_futur is defined and schedule_detail_futur %}
<div class="tc-block">
<div class="tc-border-neutral">
<div class="tc-block-header tc-bg-extralight-gray">
<h3 class="tc-textwrap-lieuville-calendar">
<a href="{{ thnet }}/spectacles/{{ url_clean }}">{{ data_object.title }}</a>
</h3>
<p class="tc-subtitle">Prochaines dates de représentation</p>
</div>
{% for key,value in schedule_detail_futur %}
<div style="border-bottom:1px solid lightgrey">
<div class="tc-block-body">
{% if value.dateshours.periode is defined and value.dateshours.periode %}
<div style="margin-bottom:0;">
{% for date,dateinfos in value.dateshours %}
{% if dateinfos.datedebut is defined and dateinfos.datedebut %}
<span class="tc-text-label-inline">{% trans %}du{% endtrans %}</span>
<span class="tc-textwrap-date">{{ dateinfos.datedebut }}</span>
{% endif %}
{% if dateinfos.datefin is defined and dateinfos.datefin %}
<span class="tc-text-label-inline">{% trans %}au{% endtrans %}</span>
<span class="tc-textwrap-date">{{ dateinfos.datefin }}</span>
{% endif %}
{% endfor %}
<br>
<p style="display:inline-block;width:100%;">
<span><a href="/contacts/{{ value.url_clean }}/" class="popup tc-textwrap-lieuville" title="Informations sur ce contact (nouvelle fenêtre)">{{ value.organisation }}</a></span>
<span>- {{ value.city }} {% if country is defined and country %}{{ value.country }}{% endif %}</span>
</p>
</div>
{% else %}
<div style="margin-bottom:0;">
<span class="tc-text-label-inline">{% trans %}lagarce_scene_le{% endtrans %}</span>
<span class="tc-textwrap-date">{{ value.dateshours.date }}</span>
<p style="display:inline-block;width:100%;">
<span><a href="/contacts/{{ value.url_clean }}/" class="popup tc-textwrap-lieuville" title="Informations sur ce contact (nouvelle fenêtre)">{{ value.organisation }}</a></span>
<span>- {{ value.city }} {% if country is defined and country %}{{ value.country }}{% endif %}</span>
</p>
</div>
{% endif %}
</div>
</div>
{% endfor %}
<div class="tc-block-footer">
<p class="tc-center"><a href="{{ thnet }}/spectacles/{{ url_clean }}/lesdates">Voir le calendrier complet</a> | <a href="/ajoutdate/dates/idspectacle/{{ data_spectacles.idspectacle }}">Ajouter des dates</a></p>
<p class="tc-center">Informations issues de l'<a href="{{ thnet }}/site/opendata">open data</a> de <a href="{{ thnet }}"><span class="tc-icon-pictotc tc-color-red"></span> Théâtre-contemporain.net</a>.</p>
</div>
</div>
</div>
{% else %}
<div class="tc-block">
<div class="tc-border-neutral">
<div class="tc-block-header tc-bg-extralight-gray">
<h3 class="tc-textwrap-lieuville-calendar">
<a href="{{ thnet }}/spectacles/{{ url_clean }}">{{ data_object.title }}</a>
</h3>
<p class="tc-subtitle">Dernières dates de représentation</p>
</div>
{% for key,value in schedule_detail_old %}
<div style="border-bottom:1px solid lightgrey">
<div class="tc-block-body">
{% if value.dateshours.periode is defined and value.dateshours.periode %}
<div style="margin-bottom:0;">
{% for date,dateinfos in value.dateshours %}
{% if dateinfos.datedebut is defined and dateinfos.datedebut %}
<span class="tc-text-label-inline">{% trans %}du{% endtrans %}</span>
<span class="tc-textwrap-date">{{ dateinfos.datedebut }}</span>
{% endif %}
{% if dateinfos.datefin is defined and dateinfos.datefin %}
<span class="tc-text-label-inline">{% trans %}au{% endtrans %}</span>
<span class="tc-textwrap-date">{{ dateinfos.datefin }}</span>
{% endif %}
{% endfor %}
<br>
<p style="display:inline-block;width:100%;">
<span><a href="/contacts/{{ value.url_clean }}/" class="popup tc-textwrap-lieuville" title="Informations sur ce contact (nouvelle fenêtre)">{{ value.organisation }}</a></span>
<span>- {{ value.city }} {% if country is defined and country %}{{ value.country }}{% endif %}</span>
</p>
</div>
{% else %}
<div style="margin-bottom:0;">
<span class="tc-text-label-inline">{% trans %}lagarce_scene_le{% endtrans %}</span>
<span class="tc-textwrap-date">{{ value.dateshours.date }}</span>
<p style="display:inline-block;width:100%;">
<span><a href="/contacts/{{ value.url_clean }}/" class="popup tc-textwrap-lieuville" title="Informations sur ce contact (nouvelle fenêtre)">{{ value.organisation }}</a></span>
<span>- {{ value.city }} {% if country is defined and country %}{{ value.country }}{% endif %}</span>
</p>
</div>
{% endif %}
</div>
</div>
{% endfor %}
<div class="tc-block-footer">
<p class="tc-center"><a href="{{ thnet }}/spectacles/{{ url_clean }}/lesdates">Voir le calendrier complet</a> | <a href="/ajoutdate/dates/idspectacle/{{ data_spectacles.idspectacle }}">Ajouter des dates</a></p>
<p class="tc-center">Informations issues de l'<a href="{{ thnet }}/site/opendata">open data</a> de <a href="{{ thnet }}"><span class="tc-icon-pictotc tc-color-red"></span> Théâtre-contemporain.net</a>.</p>
</div>
</div>
</div>
{% endif %}
{% else %}
<div class="tc-block tc-tablet-1_2 tc-phone-1_1">
<div class=" tc-border-neutral">
<div class="tc-block-header tc-bg-extralight-gray">
<h3><span class="tc-pre-mini-logo"></span> Calendrier - Dernières dates</h3>
</div>
<div class="tc-block-body">
<p class="tc-textwrap-lieuville-calendar">
<a href="{{ thnet }}/spectacles/{{ url_clean }}">{{ data_object.title }}</a>
</p>
<p>Il n'y aucune date programmée pour ce spectacle.</p>
</div>
<div class="tc-block-footer">
<p class="tc-left"><a href="{{ thnet }}/spectacles/{{ url_clean }}/lesdates">Voir le calendrier complet</a></p>
</div>
</div>
</div>
{% endif %}
</div>
</section>
</div>
{% endblock %}