{% extends 'base.html.twig' %}
{% block title %}{{ questionAnswer.title|replace({ '<br>':'' }) }}{% endblock %}
{# {% block stylesheets %}
{{ parent() }}
{% endblock %} #}
{% block body %}
<div class="titre">
<h1>{{ questionAnswer.title|raw }}</h1>
</div>
{% if is_granted('ROLE_EDITOR') %}
{% set url = ea_url()
.setController('App\\Controller\\Admin\\QuestionAnswerCrudController')
.setAction('edit')
.setEntityId(questionAnswer.id) %}
<p><a class="adm-link" href="{{ url }}" target="_blank">administrer la question-réponse</a></p>
{% endif %}
{# <div class="date">
{{questionAnswer.createdAt|date("d/m/Y")}}
</div> #}
{% include 'media/postMedias.html.twig' with {'medias': questionAnswer.medias, 'mediasType': 'slides' } %}
{% if questionAnswer.chapo|length > 5 %}
<div class="chapo">
{{ questionAnswer.chapo|raw }}
</div>
{% endif %}
{% set hideThumbnails = false %}{% for media in questionAnswer.medias|filter(media => media.role == "slide") %}{% set hideThumbnails = true %}{% endfor %}{# car icig ne veut pas de thumbnail s'il y a des slides #}
{% if not hideThumbnails %}{% include 'media/postMedias.html.twig' with {'medias': questionAnswer.medias, 'mediasType': 'thumbnails' } %}{% endif %}
<div class="contenu">
{{ questionAnswer.content|raw }}
</div>
{% include 'media/postMedias.html.twig' with {'medias': questionAnswer.medias, 'mediasType': 'documents' } %}
{# {{ render(controller('App\\Controller\\QuestionAnswerController:listSame', { 'id' : questionAnswer.id })) }} #}
{% include 'common/seealso.html.twig' with {'entity': questionAnswer } %}
<p>
Une erreur ? Un complément à ajouter ? <a href="{{ path('contact') }}"><strong>Signalez-le nous !</strong></a>
</p>
<p>
Vous souhaitez faire une autre recherche ? <a href="{{ path('themeList') }}">Faites une recherche par thème ou par mot-clé</a>
</p>
{% endblock %}