{% 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 tc-panel-article">
<div class="tc-panel-header">
<h1>écouter</h1>
</div>
{% if list_captations is defined and list_captations %}
<div class="tc-panel-body tc-panel-article">
{% for idpodcast,podcast in list_captations %}
<div class="tc-block tc-block-article">
<div class="tc-block-header">
<div class="tc-textwrap-title tc-critiques-tpl-"><span class="tc-titre" style="font-size: 1.1rem;">{{ podcast.title }}</span></div>
</div>
<div class="tc-block-body">
<p>
{{ podcast.description|raw }}
</p>
<div class="tc-text-label">
{{ podcast.date_podcast_str }}
</div>
{{ podcast.player|raw }}
{% if podcast.count_infos_total is defined and podcast.count_infos_total %}
<div class="">
<a class="tc-btn-simple tc-open-content tc-title-{{ idpodcast }}" data-idpodcast="{{ idpodcast }}">Voir les liens associés</a>
<div class="tc-hidden-block tc-block-{{ idpodcast }}" style="display: none;">
<ul class="tc-clean-list">
{% if podcast.podcast_person is defined and podcast.podcast_person %}
<li class="tc-textwrap-auteur tc-biographies-tpl-">
<span class="tc-text-label-inline">Personne(s) : </span>
{% for idperson,author in podcast.podcast_person %}
<span>
<a class="tc-titre" href="/biographies/{{ author.url_clean }}">{{ author.firstname }} {{ author.lastname }}</a>{% if author.nopunct is not defined or (author.nopunct is defined and not author.nopunct) %}, {% endif %}
</span>
{% endfor %}
</li>
{% endif %}
{% if podcast.podcast_text is defined and podcast.podcast_text %}
<li class="tc-textwrap-titre tc-editions-tpl-a">
<span class="tc-text-label-inline">Texte(s) : </span>
{% for idtext,text in podcast.podcast_text %}
<span>
<a class="tc-titre" href="/textes/{{ text.url_clean }}/">{{ text.title }}</a>{% if text.nopunct is not defined or (text.nopunct is defined and not text.nopunct) %}, {% endif %}
</span>
{% endfor %}
</li>
{% endif %}
{% if podcast.podcast_spectacle is defined and podcast.podcast_spectacle %}
<li class="tc-textwrap-titre tc-spectacles-tpl-a">
<span class="tc-text-label-inline">Spectacle(s) : </span>
{% for idspectacle,spectacle in podcast.podcast_spectacle %}
<span>
<a class="tc-titre" href="/spectacles/{{ spectacle.url_clean }}">{{ spectacle.view_name }}</a>{% if spectacle.nopunct is not defined or (spectacle.nopunct is defined and not spectacle.nopunct) %}, {% endif %}
</span>
{% endfor %}
</li>
{% endif %}
{% if podcast.podcast_contact is defined and podcast.podcast_contact %}
<li class="tc-textwrap-titre tc-contacts-tpl-">
<span class="tc-text-label-inline">Structures(s) : </span>
{% for idcontact,contact in podcast.podcast_contact %}
<span>
<a class="tc-titre" href="/contacts/{{ contact.url_clean }}">{{ contact.view_name }}</a>{% if contact.nopunct is not defined or (contact.nopunct is defined and not contact.nopunct) %}, {% endif %}
</span>
{% endfor %}
</li>
{% endif %}
</ul>
</div>
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class="tc-panel-footer">
{% include 'includes/pagination.inc.html.twig' %}
</div>
{% endif %}
<script>
$(document).ready(function(){
$('.tc-open-content').click(function(e){
var idpodcast = $(this).data('idpodcast');
if($('.tc-block-'+idpodcast).css('display') == 'none'){
$('.tc-block-'+idpodcast).css('display', 'block');
$('.tc-title-'+idpodcast).text('Fermer les liens associés');
}
else{
$('.tc-title-'+idpodcast).text('Voir les liens associés');
$('.tc-block-'+idpodcast).css('display', 'none');
}
});
});
</script>
</section>
</main>
{% endblock %}