var/cache/dev/twig/26/262276b04fca4e2d658ad915b8d9fcda.php line 40
<?phpuse Twig\Environment;use Twig\Error\LoaderError;use Twig\Error\RuntimeError;use Twig\Extension\CoreExtension;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;/* question/show.html.twig */class __TwigTemplate_a689e2d8ed2cb7708cbb937605be9c9a 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 1return "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", "question/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", "question/show.html.twig"));$this->parent = $this->loadTemplate("base.html.twig", "question/show.html.twig", 1);yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);}// line 3public 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"));yield "Question: ";yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 3, $this->source); })()), "name", [], "any", false, false, false, 3), "html", null, true);$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);return; yield '';}// line 5public 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 6yield " <div class=\"container\"><div class=\"row\"><div class=\"col-12\"><h2 class=\"my-4\">Topic:<a href=\"#link-to-topic\">";// line 11yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 11, $this->source); })()), "topic", [], "any", false, false, false, 11), "name", [], "any", false, false, false, 11), "html", null, true);yield "</a></h2><h2 class=\"my-4\">Question:</h2><div style=\"box-shadow: 2px 3px 9px 4px rgba(0,0,0,0.04);\"><div class=\"q-container-show p-4\"><div class=\"row\"><div class=\"col-2 text-center\"><img src=\"";// line 18yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 18, $this->source); })()), "askedBy", [], "any", false, false, false, 18), "avatarUrl", [], "any", false, false, false, 18)), "html", null, true);yield "\" width=\"100\" height=\"100\" alt=\"Tisha avatar\"><div class=\"mt-3\"><small>";// line 21if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 21, $this->source); })()), "isApproved", [], "any", false, false, false, 21)) {// line 22yield " Asked <br>";// line 23yield $this->extensions['Knp\Bundle\TimeBundle\Twig\Extension\TimeExtension']->diff(CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 23, $this->source); })()), "createdAt", [], "any", false, false, false, 23));yield "";} else {// line 25yield " (unpublished)";}// line 27yield " </small><form action=\"";// line 29yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_question_vote", ["slug" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 29, $this->source); })()), "slug", [], "any", false, false, false, 29)]), "html", null, true);yield "\" method=\"POST\"><div class=\"vote-arrows vote-arrows-alt flex-fill pt-2\" style=\"min-width: 90px;\"><button class=\"vote-up btn btn-link\" name=\"direction\" value=\"up\"><i class=\"far fa-arrow-alt-circle-up\"></i></button><button class=\"vote-down btn btn-link\" name=\"direction\" value=\"down\"><i class=\"far fa-arrow-alt-circle-down\"></i></button><span>";// line 33yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 33, $this->source); })()), "votesString", [], "any", false, false, false, 33), "html", null, true);yield "</span></div></form></div></div><div class=\"col\"><div class=\"d-flex justify-content-between\"><h1 class=\"q-title-show\">";// line 40yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 40, $this->source); })()), "name", [], "any", false, false, false, 40), "html", null, true);yield "</h1>";// line 42if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {// line 43yield " <a class=\"text-white\" href=\"";yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $this->extensions['EasyCorp\Bundle\EasyAdminBundle\Twig\EasyAdminTwigExtension']->getAdminUrlGenerator(), "setController", ["App\\Controller\\Admin\\QuestionCrudController"], "method", false, false, false, 43), "setAction", ["edit"], "method", false, false, false, 44), "setEntityId", ["question.id"], "method", false, false, false, 45), "html", null, true);// line 47yield "\"><span class=\"fa fa-edit\"></span></a>";}// line 51yield " </div><div class=\"q-display p-3\"><i class=\"fa fa-quote-left mr-3\"></i><p class=\"d-inline\">";// line 54yield $this->extensions['App\Twig\MarkdownExtension']->parseMarkdown(CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 54, $this->source); })()), "question", [], "any", false, false, false, 54));yield "</p><p class=\"pt-4\"><strong>--";// line 55yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 55, $this->source); })()), "askedBy", [], "any", false, false, false, 55), "fullName", [], "any", false, false, false, 55), "html", null, true);yield "</strong></p></div></div></div></div></div></div></div><div class=\"d-flex justify-content-between my-4\"><h2 class=\"\">Answers <span style=\"font-size:1.2rem;\">(";// line 65yield Twig\Extension\EscaperExtension::escape($this->env, Twig\Extension\CoreExtension::lengthFilter($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 65, $this->source); })()), "answers", [], "any", false, false, false, 65)), "html", null, true);yield ")</span></h2><button class=\"btn btn-sm btn-secondary\">Submit an Answer</button></div><ul class=\"list-unstyled\">";// line 71$context['_parent'] = $context;$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["question"]) || array_key_exists("question", $context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.', 71, $this->source); })()), "answers", [], "any", false, false, false, 71));$context['_iterated'] = false;foreach ($context['_seq'] as $context["_key"] => $context["answer"]) {// line 72yield " <li class=\"mb-4\"><div class=\"d-flex justify-content-center\"><div class=\"mr-2 pt-2\"><img src=\"";// line 75yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["answer"], "answeredBy", [], "any", false, false, false, 75), "avatarUrl", [], "any", false, false, false, 75)), "html", null, true);yield "\" width=\"50\" height=\"50\" alt=\"Tisha avatar\"></div><div class=\"mr-3 pt-2\">";// line 78yield $this->extensions['App\Twig\MarkdownExtension']->parseMarkdown(CoreExtension::getAttribute($this->env, $this->source, $context["answer"], "answer", [], "any", false, false, false, 78));yield "<p>-- ";// line 79yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["answer"], "answeredBy", [], "any", false, false, false, 79), "fullName", [], "any", false, false, false, 79), "html", null, true);yield "</p></div><div class=\"vote-arrows flex-fill pt-2 js-vote-arrows\" style=\"min-width: 90px;\"><button class=\"vote-up btn btn-link\" name=\"direction\" value=\"up\"><i class=\"far fa-arrow-alt-circle-up\"></i></button><button class=\"vote-down btn btn-link\" name=\"direction\" value=\"down\"><i class=\"far fa-arrow-alt-circle-down\"></i></button><span>";// line 84yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, $context["answer"], "votesString", [], "any", false, false, false, 84), "html", null, true);yield "</span></div></div></li>";$context['_iterated'] = true;}if (!$context['_iterated']) {// line 89yield " <li class=\"mb-4\"><div class=\"d-flex justify-content-center\">Be the first to answer!</div></li>";}$_parent = $context['_parent'];unset($context['_seq'], $context['_iterated'], $context['_key'], $context['answer'], $context['_parent'], $context['loop']);$context = array_intersect_key($context, $_parent) + $_parent;// line 95yield " </ul></div>";$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);return; yield '';}/*** @codeCoverageIgnore*/public function getTemplateName(){return "question/show.html.twig";}/*** @codeCoverageIgnore*/public function isTraitable(){return false;}/*** @codeCoverageIgnore*/public function getDebugInfo(){return array ( 245 => 95, 234 => 89, 224 => 84, 216 => 79, 212 => 78, 206 => 75, 201 => 72, 196 => 71, 187 => 65, 174 => 55, 170 => 54, 165 => 51, 159 => 47, 156 => 43, 154 => 42, 149 => 40, 139 => 33, 132 => 29, 128 => 27, 124 => 25, 119 => 23, 116 => 22, 114 => 21, 108 => 18, 98 => 11, 91 => 6, 81 => 5, 60 => 3, 37 => 1,);}public function getSourceContext(){return new Source("{% extends 'base.html.twig' %}{% block title %}Question: {{ question.name }}{% endblock %}{% block body %}<div class=\"container\"><div class=\"row\"><div class=\"col-12\"><h2 class=\"my-4\">Topic:<a href=\"#link-to-topic\">{{ question.topic.name }}</a></h2><h2 class=\"my-4\">Question:</h2><div style=\"box-shadow: 2px 3px 9px 4px rgba(0,0,0,0.04);\"><div class=\"q-container-show p-4\"><div class=\"row\"><div class=\"col-2 text-center\"><img src=\"{{ asset(question.askedBy.avatarUrl) }}\" width=\"100\" height=\"100\" alt=\"Tisha avatar\"><div class=\"mt-3\"><small>{% if question.isApproved %}Asked <br>{{ question.createdAt|ago }}{% else %}(unpublished){% endif %}</small><form action=\"{{ path('app_question_vote', { slug: question.slug }) }}\" method=\"POST\"><div class=\"vote-arrows vote-arrows-alt flex-fill pt-2\" style=\"min-width: 90px;\"><button class=\"vote-up btn btn-link\" name=\"direction\" value=\"up\"><i class=\"far fa-arrow-alt-circle-up\"></i></button><button class=\"vote-down btn btn-link\" name=\"direction\" value=\"down\"><i class=\"far fa-arrow-alt-circle-down\"></i></button><span>{{ question.votesString }}</span></div></form></div></div><div class=\"col\"><div class=\"d-flex justify-content-between\"><h1 class=\"q-title-show\">{{ question.name }}</h1>{% if is_granted('ROLE_ADMIN') %}<a class=\"text-white\" href=\"{{ ea_url().setController('App\\\\Controller\\\\Admin\\\\QuestionCrudController').setAction('edit').setEntityId('question.id')}}\"><span class=\"fa fa-edit\"></span></a>{% endif %}</div><div class=\"q-display p-3\"><i class=\"fa fa-quote-left mr-3\"></i><p class=\"d-inline\">{{ question.question|parse_markdown }}</p><p class=\"pt-4\"><strong>--{{ question.askedBy.fullName }}</strong></p></div></div></div></div></div></div></div><div class=\"d-flex justify-content-between my-4\"><h2 class=\"\">Answers <span style=\"font-size:1.2rem;\">({{ question.answers|length }})</span></h2><button class=\"btn btn-sm btn-secondary\">Submit an Answer</button></div><ul class=\"list-unstyled\">{% for answer in question.answers %}<li class=\"mb-4\"><div class=\"d-flex justify-content-center\"><div class=\"mr-2 pt-2\"><img src=\"{{ asset(answer.answeredBy.avatarUrl) }}\" width=\"50\" height=\"50\" alt=\"Tisha avatar\"></div><div class=\"mr-3 pt-2\">{{ answer.answer|parse_markdown }}<p>-- {{ answer.answeredBy.fullName }}</p></div><div class=\"vote-arrows flex-fill pt-2 js-vote-arrows\" style=\"min-width: 90px;\"><button class=\"vote-up btn btn-link\" name=\"direction\" value=\"up\"><i class=\"far fa-arrow-alt-circle-up\"></i></button><button class=\"vote-down btn btn-link\" name=\"direction\" value=\"down\"><i class=\"far fa-arrow-alt-circle-down\"></i></button><span>{{ answer.votesString }}</span></div></div></li>{% else %}<li class=\"mb-4\"><div class=\"d-flex justify-content-center\">Be the first to answer!</div></li>{% endfor %}</ul></div>{% endblock %}", "question/show.html.twig", "/var/www/admin-apag/templates/question/show.html.twig");}}