<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* questionAnswer/show.html.twig */
class __TwigTemplate_0ad41ed2b549aad57078fa9cb357e37d extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "questionAnswer/show.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "questionAnswer/show.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "questionAnswer/show.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo twig_escape_filter($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 3, $this->source); })()), "title", [], "any", false, false, false, 3), ["<br>" => ""]), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 9
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 10
echo "\t<div class=\"titre\">
\t\t<h1>";
// line 11
echo twig_get_attribute($this->env, $this->source, (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 11, $this->source); })()), "title", [], "any", false, false, false, 11);
echo "</h1>
\t</div>
\t";
// line 13
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_EDITOR")) {
// line 14
echo "\t\t";
$context["url"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $this->extensions['EasyCorp\Bundle\EasyAdminBundle\Twig\EasyAdminTwigExtension']->getAdminUrlGenerator(), "setController", ["App\\Controller\\Admin\\QuestionAnswerCrudController"], "method", false, false, false, 14), "setAction", ["edit"], "method", false, false, false, 15), "setEntityId", [twig_get_attribute($this->env, $this->source, // line 17
(isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 17, $this->source); })()), "id", [], "any", false, false, false, 17)], "method", false, false, false, 16);
// line 18
echo "\t\t<p><a class=\"adm-link\" href=\"";
echo twig_escape_filter($this->env, (isset($context["url"]) || array_key_exists("url", $context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.', 18, $this->source); })()), "html", null, true);
echo "\" target=\"_blank\">administrer la question-réponse</a></p>
\t";
}
// line 20
echo "\t";
// line 23
echo "
\t";
// line 24
$this->loadTemplate("media/postMedias.html.twig", "questionAnswer/show.html.twig", 24)->display(twig_array_merge($context, ["medias" => twig_get_attribute($this->env, $this->source, (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 24, $this->source); })()), "medias", [], "any", false, false, false, 24), "mediasType" => "slides"]));
// line 25
echo "
";
// line 26
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 26, $this->source); })()), "chapo", [], "any", false, false, false, 26)) > 5)) {
// line 27
echo " <div class=\"chapo\">
";
// line 28
echo twig_get_attribute($this->env, $this->source, (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 28, $this->source); })()), "chapo", [], "any", false, false, false, 28);
echo "
</div>
";
}
// line 31
echo "
";
// line 32
$context["hideThumbnails"] = false;
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_array_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 32, $this->source); })()), "medias", [], "any", false, false, false, 32), function ($__media__) use ($context, $macros) { $context["media"] = $__media__; return (twig_get_attribute($this->env, $this->source, $context["media"], "role", [], "any", false, false, false, 32) == "slide"); }));
foreach ($context['_seq'] as $context["_key"] => $context["media"]) {
$context["hideThumbnails"] = true;
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['media'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 33
echo " ";
if ( !(isset($context["hideThumbnails"]) || array_key_exists("hideThumbnails", $context) ? $context["hideThumbnails"] : (function () { throw new RuntimeError('Variable "hideThumbnails" does not exist.', 33, $this->source); })())) {
$this->loadTemplate("media/postMedias.html.twig", "questionAnswer/show.html.twig", 33)->display(twig_array_merge($context, ["medias" => twig_get_attribute($this->env, $this->source, (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 33, $this->source); })()), "medias", [], "any", false, false, false, 33), "mediasType" => "thumbnails"]));
}
// line 34
echo "\t
\t<div class=\"contenu\">
\t\t";
// line 36
echo twig_get_attribute($this->env, $this->source, (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 36, $this->source); })()), "content", [], "any", false, false, false, 36);
echo "
\t</div>
\t";
// line 39
$this->loadTemplate("media/postMedias.html.twig", "questionAnswer/show.html.twig", 39)->display(twig_array_merge($context, ["medias" => twig_get_attribute($this->env, $this->source, (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 39, $this->source); })()), "medias", [], "any", false, false, false, 39), "mediasType" => "documents"]));
// line 40
echo "
\t";
// line 42
echo " ";
$this->loadTemplate("common/seealso.html.twig", "questionAnswer/show.html.twig", 42)->display(twig_array_merge($context, ["entity" => (isset($context["questionAnswer"]) || array_key_exists("questionAnswer", $context) ? $context["questionAnswer"] : (function () { throw new RuntimeError('Variable "questionAnswer" does not exist.', 42, $this->source); })())]));
// line 43
echo "
\t<p>
\t\tUne erreur ? Un complément à ajouter ? <a href=\"";
// line 45
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("contact");
echo "\"><strong>Signalez-le nous !</strong></a>
\t</p>
\t<p>
\t\tVous souhaitez faire une autre recherche ? <a href=\"";
// line 48
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("themeList");
echo "\">Faites une recherche par thème ou par mot-clé</a>
\t</p>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "questionAnswer/show.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 175 => 48, 169 => 45, 165 => 43, 162 => 42, 159 => 40, 157 => 39, 151 => 36, 147 => 34, 142 => 33, 132 => 32, 129 => 31, 123 => 28, 120 => 27, 118 => 26, 115 => 25, 113 => 24, 110 => 23, 108 => 20, 102 => 18, 100 => 17, 98 => 14, 96 => 13, 91 => 11, 88 => 10, 78 => 9, 59 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}{{ questionAnswer.title|replace({ '<br>':'' }) }}{% endblock %}
{# {% block stylesheets %}
\t{{ parent() }}
{% endblock %} #}
{% block body %}
\t<div class=\"titre\">
\t\t<h1>{{ questionAnswer.title|raw }}</h1>
\t</div>
\t{% if is_granted('ROLE_EDITOR') %}
\t\t{% set url = ea_url()
\t\t\t.setController('App\\\\Controller\\\\Admin\\\\QuestionAnswerCrudController')
\t\t\t.setAction('edit')
\t\t\t.setEntityId(questionAnswer.id) %}
\t\t<p><a class=\"adm-link\" href=\"{{ url }}\" target=\"_blank\">administrer la question-réponse</a></p>
\t{% endif %}
\t{# <div class=\"date\">
\t\t{{questionAnswer.createdAt|date(\"d/m/Y\")}}
\t</div> #}
\t{% 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 %}
\t
\t<div class=\"contenu\">
\t\t{{ questionAnswer.content|raw }}
\t</div>
\t{% include 'media/postMedias.html.twig' with {'medias': questionAnswer.medias, 'mediasType': 'documents' } %}
\t{# {{ render(controller('App\\\\Controller\\\\QuestionAnswerController:listSame', { 'id' : questionAnswer.id })) }} #}
{% include 'common/seealso.html.twig' with {'entity': questionAnswer } %}
\t<p>
\t\tUne erreur ? Un complément à ajouter ? <a href=\"{{ path('contact') }}\"><strong>Signalez-le nous !</strong></a>
\t</p>
\t<p>
\t\tVous souhaitez faire une autre recherche ? <a href=\"{{ path('themeList') }}\">Faites une recherche par thème ou par mot-clé</a>
\t</p>
{% endblock %}
", "questionAnswer/show.html.twig", "/home/ovow2306/public_html/ici-grenoble/ici-gre-back-dev/templates/questionAnswer/show.html.twig");
}
}