var/cache/dev/twig/7c/7ce51b47687ad6da92a125c254b0da16.php line 49

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* question/show.html.twig */
  14. class __TwigTemplate_66a2fca6fe6a351af2454b9ce806ed4c extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'body' => [$this'block_body'],
  25.         ];
  26.     }
  27.     protected function doGetParent(array $context)
  28.     {
  29.         // line 1
  30.         return "base.html.twig";
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""question/show.html.twig"));
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""question/show.html.twig"));
  39.         $this->parent $this->loadTemplate("base.html.twig""question/show.html.twig"1);
  40.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  41.         
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  43.         
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  45.     }
  46.     // line 3
  47.     public function block_title($context, array $blocks = [])
  48.     {
  49.         $macros $this->macros;
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  54.         echo "Question: ";
  55.         echo twig_escape_filter($this->envtwig_get_attribute($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"falsefalsefalse3), "html"nulltrue);
  56.         
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  58.         
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  60.     }
  61.     // line 5
  62.     public function block_body($context, array $blocks = [])
  63.     {
  64.         $macros $this->macros;
  65.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  66.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  67.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  68.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  69.         // line 6
  70.         echo "<div class=\"container\">
  71.     <div class=\"row\">
  72.         <div class=\"col-12\">
  73.             <h2 class=\"my-4\">
  74.                 Topic:
  75.                 <a href=\"#link-to-topic\">";
  76.         // line 11
  77.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($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"falsefalsefalse11), "name", [], "any"falsefalsefalse11), "html"nulltrue);
  78.         echo "</a>
  79.             </h2>
  80.             <h2 class=\"my-4\">Question:</h2>
  81.             <div style=\"box-shadow: 2px 3px 9px 4px rgba(0,0,0,0.04);\">
  82.                 <div class=\"q-container-show p-4\">
  83.                     <div class=\"row\">
  84.                         <div class=\"col-2 text-center\">
  85.                             <img src=\"";
  86.         // line 18
  87.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->sourcetwig_get_attribute($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"falsefalsefalse18), "avatarUrl", [], "any"falsefalsefalse18)), "html"nulltrue);
  88.         echo "\" width=\"100\" height=\"100\"  alt=\"Tisha avatar\">
  89.                             <div class=\"mt-3\">
  90.                                 <small>
  91.                                     ";
  92.         // line 21
  93.         if (twig_get_attribute($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"falsefalsefalse21)) {
  94.             // line 22
  95.             echo "                                        Asked <br>
  96.                                         ";
  97.             // line 23
  98.             echo $this->extensions['Knp\Bundle\TimeBundle\Twig\Extension\TimeExtension']->diff(twig_get_attribute($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"falsefalsefalse23));
  99.             echo "
  100.                                     ";
  101.         } else {
  102.             // line 25
  103.             echo "                                        (unpublished)
  104.                                     ";
  105.         }
  106.         // line 27
  107.         echo "                                </small>
  108.                                 <form action=\"";
  109.         // line 29
  110.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_question_vote", ["slug" => twig_get_attribute($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"falsefalsefalse29)]), "html"nulltrue);
  111.         echo "\" method=\"POST\">
  112.                                     <div class=\"vote-arrows vote-arrows-alt flex-fill pt-2\" style=\"min-width: 90px;\">
  113.                                         <button class=\"vote-up btn btn-link\" name=\"direction\" value=\"up\"><i class=\"far fa-arrow-alt-circle-up\"></i></button>
  114.                                         <button class=\"vote-down btn btn-link\" name=\"direction\" value=\"down\"><i class=\"far fa-arrow-alt-circle-down\"></i></button>
  115.                                         <span>";
  116.         // line 33
  117.         echo twig_escape_filter($this->envtwig_get_attribute($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"falsefalsefalse33), "html"nulltrue);
  118.         echo "</span>
  119.                                     </div>
  120.                                 </form>
  121.                             </div>
  122.                         </div>
  123.                         <div class=\"col\">
  124.                             <div class=\"col\">
  125.                                 <div class=\"d-flex justify-content-between\">
  126.                                     <h1 class=\"q-title-show\">";
  127.         // line 41
  128.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["question"]) || array_key_exists("question"$context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.'41$this->source); })()), "name", [], "any"falsefalsefalse41), "html"nulltrue);
  129.         echo "</h1>
  130.                                     ";
  131.         // line 42
  132.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  133.             // line 43
  134.             echo "                                        <a class=\"text-white\" href=\"";
  135.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$this->extensions['EasyCorp\Bundle\EasyAdminBundle\Twig\EasyAdminTwigExtension']->getAdminUrlGenerator(), "setController", ["App\\Controller\\Admin\\QuestionCrudController"], "method"falsefalsefalse43), "setAction", ["edit"], "method"falsefalsefalse44), "setEntityId", [twig_get_attribute($this->env$this->source,             // line 46
  136. (isset($context["question"]) || array_key_exists("question"$context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.'46$this->source); })()), "id", [], "any"falsefalsefalse46)], "method"falsefalsefalse45), "html"nulltrue);
  137.             // line 47
  138.             echo "\">
  139.                                             <span class=\"fa fa-edit\"></span>
  140.                                         </a>
  141.                                     ";
  142.         }
  143.         // line 51
  144.         echo "                                </div>
  145.                             </div>
  146.                             <div class=\"q-display p-3\">
  147.                                 <i class=\"fa fa-quote-left mr-3\"></i>
  148.                                 <p class=\"d-inline\">";
  149.         // line 55
  150.         echo twig_escape_filter($this->envtwig_get_attribute($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); })()), "question", [], "any"falsefalsefalse55), "html"nulltrue);
  151.         echo "</p>
  152.                                 <p class=\"pt-4\"><strong>--";
  153.         // line 56
  154.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["question"]) || array_key_exists("question"$context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.'56$this->source); })()), "askedBy", [], "any"falsefalsefalse56), "fullName", [], "any"falsefalsefalse56), "html"nulltrue);
  155.         echo "</strong></p>
  156.                             </div>
  157.                         </div>
  158.                     </div>
  159.                 </div>
  160.             </div>
  161.         </div>
  162.     </div>
  163.     <div class=\"d-flex justify-content-between my-4\">
  164.         <h2 class=\"\">Answers <span style=\"font-size:1.2rem;\">(";
  165.         // line 66
  166.         echo twig_escape_filter($this->envtwig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["question"]) || array_key_exists("question"$context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.'66$this->source); })()), "answers", [], "any"falsefalsefalse66)), "html"nulltrue);
  167.         echo ")</span></h2>
  168.         <button class=\"btn btn-sm btn-secondary\">Submit an Answer</button>
  169.     </div>
  170.     <ul class=\"list-unstyled\">
  171.         ";
  172.         // line 73
  173.         $context['_parent'] = $context;
  174.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["question"]) || array_key_exists("question"$context) ? $context["question"] : (function () { throw new RuntimeError('Variable "question" does not exist.'73$this->source); })()), "answers", [], "any"falsefalsefalse73));
  175.         $context['_iterated'] = false;
  176.         foreach ($context['_seq'] as $context["_key"] => $context["answer"]) {
  177.             // line 74
  178.             echo "            <li class=\"mb-4\">
  179.                 <div class=\"d-flex justify-content-center\">
  180.                     <div class=\"mr-2 pt-2\">
  181.                         <img src=\"";
  182.             // line 77
  183.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["answer"], "answeredBy", [], "any"falsefalsefalse77), "avatarUrl", [], "any"falsefalsefalse77)), "html"nulltrue);
  184.             echo "\" width=\"50\" height=\"50\" alt=\"Tisha avatar\">
  185.                     </div>
  186.                     <div class=\"mr-3 pt-2\">
  187.                         ";
  188.             // line 80
  189.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["answer"], "answer", [], "any"falsefalsefalse80), "html"nulltrue);
  190.             echo "
  191.                         <p>-- ";
  192.             // line 81
  193.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["answer"], "answeredBy", [], "any"falsefalsefalse81), "fullName", [], "any"falsefalsefalse81), "html"nulltrue);
  194.             echo "</p>
  195.                     </div>
  196.                     <div class=\"vote-arrows flex-fill pt-2 js-vote-arrows\" style=\"min-width: 90px;\">
  197.                         <button class=\"vote-up btn btn-link\" name=\"direction\" value=\"up\"><i class=\"far fa-arrow-alt-circle-up\"></i></button>
  198.                         <button class=\"vote-down btn btn-link\" name=\"direction\" value=\"down\"><i class=\"far fa-arrow-alt-circle-down\"></i></button>
  199.                         <span>";
  200.             // line 86
  201.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["answer"], "votesString", [], "any"falsefalsefalse86), "html"nulltrue);
  202.             echo "</span>
  203.                     </div>
  204.                 </div>
  205.             </li>
  206.         ";
  207.             $context['_iterated'] = true;
  208.         }
  209.         if (!$context['_iterated']) {
  210.             // line 91
  211.             echo "            <li class=\"mb-4\">
  212.                 <div class=\"d-flex justify-content-center\">
  213.                     Be the first to answer!
  214.                 </div>
  215.             </li>
  216.         ";
  217.         }
  218.         $_parent $context['_parent'];
  219.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['answer'], $context['_parent'], $context['loop']);
  220.         $context array_intersect_key($context$_parent) + $_parent;
  221.         // line 97
  222.         echo "    </ul>
  223. </div>
  224. ";
  225.         
  226.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  227.         
  228.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  229.     }
  230.     /**
  231.      * @codeCoverageIgnore
  232.      */
  233.     public function getTemplateName()
  234.     {
  235.         return "question/show.html.twig";
  236.     }
  237.     /**
  238.      * @codeCoverageIgnore
  239.      */
  240.     public function isTraitable()
  241.     {
  242.         return false;
  243.     }
  244.     /**
  245.      * @codeCoverageIgnore
  246.      */
  247.     public function getDebugInfo()
  248.     {
  249.         return array (  246 => 97,  235 => 91,  225 => 86,  217 => 81,  213 => 80,  207 => 77,  202 => 74,  197 => 73,  187 => 66,  174 => 56,  170 => 55,  164 => 51,  158 => 47,  156 => 46,  154 => 43,  152 => 42,  148 => 41,  137 => 33,  130 => 29,  126 => 27,  122 => 25,  117 => 23,  114 => 22,  112 => 21,  106 => 18,  96 => 11,  89 => 6,  79 => 5,  59 => 3,  36 => 1,);
  250.     }
  251.     public function getSourceContext()
  252.     {
  253.         return new Source("{% extends 'base.html.twig' %}
  254. {% block title %}Question: {{ question.name }}{% endblock %}
  255. {% block body %}
  256. <div class=\"container\">
  257.     <div class=\"row\">
  258.         <div class=\"col-12\">
  259.             <h2 class=\"my-4\">
  260.                 Topic:
  261.                 <a href=\"#link-to-topic\">{{ question.topic.name }}</a>
  262.             </h2>
  263.             <h2 class=\"my-4\">Question:</h2>
  264.             <div style=\"box-shadow: 2px 3px 9px 4px rgba(0,0,0,0.04);\">
  265.                 <div class=\"q-container-show p-4\">
  266.                     <div class=\"row\">
  267.                         <div class=\"col-2 text-center\">
  268.                             <img src=\"{{ asset(question.askedBy.avatarUrl) }}\" width=\"100\" height=\"100\"  alt=\"Tisha avatar\">
  269.                             <div class=\"mt-3\">
  270.                                 <small>
  271.                                     {% if question.isApproved %}
  272.                                         Asked <br>
  273.                                         {{ question.createdAt|ago }}
  274.                                     {% else %}
  275.                                         (unpublished)
  276.                                     {% endif %}
  277.                                 </small>
  278.                                 <form action=\"{{ path('app_question_vote', { slug: question.slug }) }}\" method=\"POST\">
  279.                                     <div class=\"vote-arrows vote-arrows-alt flex-fill pt-2\" style=\"min-width: 90px;\">
  280.                                         <button class=\"vote-up btn btn-link\" name=\"direction\" value=\"up\"><i class=\"far fa-arrow-alt-circle-up\"></i></button>
  281.                                         <button class=\"vote-down btn btn-link\" name=\"direction\" value=\"down\"><i class=\"far fa-arrow-alt-circle-down\"></i></button>
  282.                                         <span>{{ question.votesString }}</span>
  283.                                     </div>
  284.                                 </form>
  285.                             </div>
  286.                         </div>
  287.                         <div class=\"col\">
  288.                             <div class=\"col\">
  289.                                 <div class=\"d-flex justify-content-between\">
  290.                                     <h1 class=\"q-title-show\">{{ question.name }}</h1>
  291.                                     {% if is_granted('ROLE_ADMIN') %}
  292.                                         <a class=\"text-white\" href=\"{{ ea_url()
  293.                                             .setController('App\\\\Controller\\\\Admin\\\\QuestionCrudController')
  294.                                             .setAction('edit')
  295.                                             .setEntityId(question.id)
  296.                                         }}\">
  297.                                             <span class=\"fa fa-edit\"></span>
  298.                                         </a>
  299.                                     {% endif %}
  300.                                 </div>
  301.                             </div>
  302.                             <div class=\"q-display p-3\">
  303.                                 <i class=\"fa fa-quote-left mr-3\"></i>
  304.                                 <p class=\"d-inline\">{{ question.question }}</p>
  305.                                 <p class=\"pt-4\"><strong>--{{ question.askedBy.fullName }}</strong></p>
  306.                             </div>
  307.                         </div>
  308.                     </div>
  309.                 </div>
  310.             </div>
  311.         </div>
  312.     </div>
  313.     <div class=\"d-flex justify-content-between my-4\">
  314.         <h2 class=\"\">Answers <span style=\"font-size:1.2rem;\">({{ question.answers|length }})</span></h2>
  315.         <button class=\"btn btn-sm btn-secondary\">Submit an Answer</button>
  316.     </div>
  317.     <ul class=\"list-unstyled\">
  318.         {% for answer in question.answers %}
  319.             <li class=\"mb-4\">
  320.                 <div class=\"d-flex justify-content-center\">
  321.                     <div class=\"mr-2 pt-2\">
  322.                         <img src=\"{{ asset(answer.answeredBy.avatarUrl) }}\" width=\"50\" height=\"50\" alt=\"Tisha avatar\">
  323.                     </div>
  324.                     <div class=\"mr-3 pt-2\">
  325.                         {{ answer.answer }}
  326.                         <p>-- {{ answer.answeredBy.fullName }}</p>
  327.                     </div>
  328.                     <div class=\"vote-arrows flex-fill pt-2 js-vote-arrows\" style=\"min-width: 90px;\">
  329.                         <button class=\"vote-up btn btn-link\" name=\"direction\" value=\"up\"><i class=\"far fa-arrow-alt-circle-up\"></i></button>
  330.                         <button class=\"vote-down btn btn-link\" name=\"direction\" value=\"down\"><i class=\"far fa-arrow-alt-circle-down\"></i></button>
  331.                         <span>{{ answer.votesString }}</span>
  332.                     </div>
  333.                 </div>
  334.             </li>
  335.         {% else %}
  336.             <li class=\"mb-4\">
  337.                 <div class=\"d-flex justify-content-center\">
  338.                     Be the first to answer!
  339.                 </div>
  340.             </li>
  341.         {% endfor %}
  342.     </ul>
  343. </div>
  344. {% endblock %}
  345. ""question/show.html.twig""/home/u538818725/domains/growupcrypto.site/public_html/templates/question/show.html.twig");
  346.     }
  347. }