{% extends 'templates.html.twig' %}
{% block headcontent %}
{% include 'includes/navigation.inc.html.twig' %}
{% endblock %}
{% block content %}
{% if error_annonce is defined and error_annonce %}
{% include 'includes/result.inc.html.twig' %}
{% else %}
{% if error_preview is defined and error_preview %}
{% include 'includes/result.inc.html.twig' %}
{% endif %}
{% include 'montheatre/bookmarking.inc.html.twig' %}
<main class="tc-desktop-2_3 tc-phone-1_1">
<section class="tc-header row tc-annonces">
<header class="tc-panel">
<div class="tc-panel-header">
{% if annonce.categorie is defined and annonce.categorie is not empty %}
<h2 class="tc-neutral-color"><a href="/annonces/{{ annonce.categorie.url_clean }}/">{{ annonce.categorie.name }}</a></h2>
{% endif %}
<h1>{{ annonce.sujet }}</h1>
{% if modif_annonce is defined and modif_annonce %}
<p class="tc-neutral-color tc-subtitle"><a href="/montheatre/">{{ app.user.login }}</a>, voici le détail de l'annonce que vous avez postée</p>
{% endif %}
{% if reponses_by_user is defined and reponses_by_user %}
<p class="tc-neutral-color tc-subtitle"><a href="/montheatre/">{{ app.user.login }}</a>, vous avez répondu à cette annonce !</p>
{% endif %}
</div>
</header>
<nav id="tc-subnav-annonces" class="tc-subnav tc-no-bg">
<ul class="tc-clean-list tc-no-bg">
{% if modif_annonce is defined and modif_annonce %}
<li class="tc-no-bg"><a href="/montheatre/annonces/deleteannonce/{{ annonce.idannonce }}" title="Êtes-vous sûr de vouloir supprimer cette annonce ?" ><span class="tc-icon-cancel"></span>Supprimer</a></li>
<li class="tc-no-bg"><a href="/annonces/proposer/ajouter/idannonce/{{ annonce.idannonce }}" ><span class='tc-icon-edit'></span>Modifier</a></li>
{% endif %}
{% if modif_annonce is not defined or (modif_annonce is defined and not modif_annonce) %}
<li class="tc-no-bg"><a href="{{ annonce.url_clean }}?contact" rel="nofollow"><span class="tc-icon-mail"></span>Contacter l'annonceur</a></li>
{% endif %}
<li class="tc-no-bg" ><a href="{{ annonce.url_clean }}?print" onclick="window.open(this.href); return false;" rel="nofollow"><span class="tc-icon-doc-text"></span>Imprimer</a></li>
{# <li class="tc-no-bg" ><a href="{{ annonce.url_clean }}?envoiami" rel="nofollow"><span class="tc-icon-chat-alt"></span> Envoyer à un(e) ami(e)</a></li>#}
{% if modif_annonce is not defined or (modif_annonce is defined and not modif_annonce) %}
<li class="tc-no-bg"><a href="{{ annonce.url_clean }}?signaler" rel="nofollow"><span class="tc-icon-warning"></span> Signaler</a></li>
{% endif %}
</ul>
</nav>
</section>
{% if contact is defined and contact %}
{% include 'annonces/contact-annonce.html.twig' %}
{% endif %}
{% if envoiami is defined and envoiami %}
{% include 'annonces/envoyer-ami.html.twig' %}
{% endif %}
{% if signaler is defined and signaler %}
{% include 'annonces/signaler.html.twig' %}
{% endif %}
{% if reponses_by_user is defined and reponses_by_user %}
<div class="tc-block">
<ul>
{% for idreponse,reponse in reponses_by_user %}
<li>
Vous avez répondu à l'annonceur <span>le {{ reponse.dateinsert }} à {{ reponse.heureinsert }}</span>
{% if reponse.reponse is defined and reponse.reponse %}
{{ reponse.reponse }}
{% else %}
<a href="{{ annonce.url_clean }}?voir-reponse={{ reponse.idreponse }}#reponse{{ reponse.idreponse }}">{{ reponse.debut_reponse }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
<p>Ces réponses ne sont visibles que par vous-même et l'annonceur.</p>
</div>
{% endif %}
{% if annonce_reponses is defined and annonce_reponses %}
<div class="tc-block">
<h3>{{ nb_reponses }} réponse(s) enregistrée(s) pour votre annonce</h3>
<ul>
{% for idreponse,reponse in annonce_reponses %}
<li>
Réponse de :
<a href="mailto:{{ reponse.lecteur_email }}">{{ reponse.lecteur_nom }}</a>
<a href="mailto:{{ reponse.lecteur_email }}">{{ reponse.lecteur_email }}</a>
{% if reponse.extranetuser is defined and reponse.extranetuser %}
<span>(utilisateur <i>mon théâtre</i> {{ reponse.extranetuser.login }})</span>
{% endif %}
<span>le {{ reponse.dateinsert }} à {{ reponse.heureinsert }}</span>
{% if reponse.reponse is defined and reponse.reponse %}
{{ reponse.reponse }}
{% else %}
<a href="{{ annonce.url_clean }}?voir-reponse={{ reponse.idreponse }}#reponse{{ reponse.idreponse }}">
{% if reponse.dateread is defined and reponse.dateread %}
<span>[lu]</span> {{ reponse.debut_reponse }}
{% else %}
<span>[non lu]</span> {{ reponse.debut_reponse }}
{% endif %}
</a>
{% endif %}
</li>
{% endfor %}
</ul>
<p>Ces réponses ne sont visibles que par vous-même et leurs auteurs respectifs.</p>
</div>
{% endif %}
<section class="tc-panel">
{% if annonce.typecontrat is defined and annonce.typecontrat %}
<div class="tc-panel-header">
<h3>Type de contrat : {{ annonce.typecontrat }}</h3>
</div>
{% endif %}
<div class="tc-panel-body">
<div class="tc-block">
<div class="tc-neutral-color tc-block-body">
<h5>Annonce #{{ annonce.idannonce }}</h5>
<ul class="tc-default-list">
<li>Postée le {{ annonce.dateinsert }} à {{ annonce.heureinsert }} par {{ annonce.nom }}
{% if modif_annonce is not defined or (modif_annonce is defined and not modif_annonce) %}
<span>( <a href="{{ annonce.url_clean }}?contact" rel="nofollow">contacter</a> )</span>
{% endif %}
</li>
{% if annonce.lieu is defined and annonce.lieu %}
<li>Lieu : {{ annonce.lieu }} {% if annonce.cp is defined and annonce.cp %}({{ annonce.cp }}){% endif %}</li>
{% endif %}
{% if annonce.site is defined and annonce.site %}
<li><strong>Site Internet</strong> : <a href="{{ annonce.site }}" onclick="window.open(this.href); return false;" rel="nofollow">{{ annonce.site }}</a></li>
{% endif %}
{% if annonce.adresse is defined and annonce.adresse %}
<li>Adresse postale : {{ annonce.adresse }} / {{ annonce.cp }} {% if annonce.lieu is defined and annonce.lieu %}/ {{ annonce.lieu }}{% endif %} / {{ annonce.pays }}</li>
{% endif %}
{% if annonce.dateupdate is defined and annonce.dateupdate %}
<li>Cette annonce a été modifiée le {{ annonce.dateupdate }} à {#{{ annonce.heureupdate }}#}</li>
{% endif %}
{% if annonce_ancienne is defined and annonce_ancienne %}
<li>Information : La dernière mise à jour de cette annonce date de plus de 30 jours.</li>
{% endif %}
</ul>
</div>
</div>
<div class="tc-block tc-block-article">
<div class="tc-block-body">
{{ annonce.description|raw }}
{# {{ annonce.video_src|raw }}#}
</div>
</div>
{% if annonce.url_fichier is defined and annonce.url_fichier %}
<div class="tc-block ">
<div class="tc-block-header">
<h3 class="tc-neutral-color">Document(s) associé(s) : </h3>
</div>
<div class="tc-block-body">
<a href="{{ annonce.url_fichier }}" onclick="window.open(this.href); return false;">
<figure style="min-width:30px" class="tc-media-thumbnail">
<img src="/images/vignettes/{{ annonce.typefichier }}.png" alt=""/>
</figure>
<div class="tc-block-body-text">Document joint</div>
</a>
</div>
</div>
{% endif %}
</div>
</section>
{% endif %}
{% if error_annonce is not defined or (error_annonce is defined and not error_annonce) %}
<!-- {if:geocodable}
<section class="tc-panel ">
<div class="tc-panel-header">
<h3>Localisation de l'annonceur</h3>
</div>
<div class="tc-panel-body">
<div class="tc-block">
<div class="tc-block-body">
<flexy:include src="includes/google.inc.html" />
</div>
</div>
</div>
</section>
{end:} -->
{% endif %}
</main>
{% endblock %}