var/cache/dev/twig/01/01fe1476de90c969916518abbd0f1357.php line 53

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. /* pages/battle-detail.html.twig */
  14. class __TwigTemplate_a0ad49ee9364dc116261618ab055dbe2 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.             'bodyClass' => [$this'block_bodyClass'],
  25.             'body' => [$this'block_body'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""pages/battle-detail.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""pages/battle-detail.html.twig"));
  40.         // line 4
  41.         $macros["macros"] = $this->macros["macros"] = $this->loadTemplate("components/macros.html.twig""pages/battle-detail.html.twig"4)->unwrap();
  42.         // line 1
  43.         $this->parent $this->loadTemplate("base.html.twig""pages/battle-detail.html.twig"1);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 2
  51.     public function block_title($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  58.         echo "Battle detail";
  59.         
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  61.         
  62.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  63.     }
  64.     // line 3
  65.     public function block_bodyClass($context, array $blocks = [])
  66.     {
  67.         $macros $this->macros;
  68.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  69.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyClass"));
  70.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  71.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyClass"));
  72.         echo "battleBody";
  73.         
  74.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  75.         
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  77.     }
  78.     // line 7
  79.     public function block_body($context, array $blocks = [])
  80.     {
  81.         $macros $this->macros;
  82.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  83.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  84.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  85.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  86.         // line 8
  87.         echo "
  88.     <section id=\"battles\" class=\"battles mb-5\">
  89.         <div class=\"container\">
  90.             <div class=\"row\">
  91.                 <div class=\"col-12 heading\">
  92.                     <h2><span class=\"text-success text-bold\">";
  93.         // line 13
  94.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'13$this->source); })()), "challenger", [], "any"falsefalsefalse13), "pseudoname", [], "any"falsefalsefalse13), "html"nulltrue);
  95.         echo "</span> <span class=\"text-muted\">vs.</span> <span class=\"text-danger text-bold\">";
  96.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'13$this->source); })()), "oponnent", [], "any"falsefalsefalse13), "pseudoname", [], "any"falsefalsefalse13), "html"nulltrue);
  97.         echo "</span></h2>
  98.                 </div>
  99.             </div>
  100.             <div class=\"row\">
  101.                 <button class=\"js-btn-vote col-1 mb-4 btn btn-outline btn-vote\" data-type=\"challenger\" data-battle-id=\"";
  102.         // line 17
  103.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'17$this->source); })()), "id", [], "any"falsefalsefalse17), "html"nulltrue);
  104.         echo "\" data-rapper-id=\"";
  105.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'17$this->source); })()), "challenger", [], "any"falsefalsefalse17), "id", [], "any"falsefalsefalse17), "html"nulltrue);
  106.         echo "\" data-user-logged=\"";
  107.         if (twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'17$this->source); })()), "user", [], "any"falsefalsefalse17)) {
  108.             echo "true";
  109.         } else {
  110.             echo "false";
  111.         }
  112.         echo "\" ";
  113.         if (twig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'17$this->source); })()), "isFinished", [], "any"falsefalsefalse17)) {
  114.             echo "disabled";
  115.         }
  116.         echo ">
  117.                     <div class=\"icon\">
  118.                         <i class=\"bi bi-hand-thumbs-up\"></i>
  119.                         <small>";
  120.         // line 20
  121.         echo twig_escape_filter($this->env$this->extensions['App\Extensions\VoteTwigExtensions']->getBattleVotesChallenger((isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'20$this->source); })())), "html"nulltrue);
  122.         echo "x</small>
  123.                     </div>
  124.                 </button>
  125.                 <div class=\"card battle-card mb-4 box-shadow position-relative col-10\">
  126.                     <div class=\"card-bg-players position-absolute\">
  127.                         <div class=\"card-player-left\">
  128.                             <img src=\"";
  129.         // line 26
  130.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/images/rappers/" twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'26$this->source); })()), "challenger", [], "any"falsefalsefalse26), "avatarName", [], "any"falsefalsefalse26))), "html"nulltrue);
  131.         echo "\" alt=\"Challenger\"/>
  132.                         </div>
  133.                         <img src=\"";
  134.         // line 28
  135.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/VS-BIG.png"), "html"nulltrue);
  136.         echo "\" class=\"card-player-mid\" alt=\"Divider\"/>
  137.                         <div class=\"card-player-right\">
  138.                             <img src=\"";
  139.         // line 30
  140.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/images/rappers/" twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'30$this->source); })()), "oponnent", [], "any"falsefalsefalse30), "avatarName", [], "any"falsefalsefalse30))), "html"nulltrue);
  141.         echo "\"  alt=\"Opponent\"/>
  142.                         </div>
  143.                     </div>
  144.                     <div class=\"card-controls position-absolute\">
  145.                         <div class=\"card-bottom-controls detail\">
  146.                             <div class=\"playingIndicator\" data-indicator-id='";
  147.         // line 40
  148.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'40$this->source); })()), "id", [], "any"falsefalsefalse40), "html"nulltrue);
  149.         echo "' style='--piWidth: 0%;'></div>
  150.                             <div class=\"card-voting-controls position-absolute pt-4\">
  151.                                 <small class=\"text-white\">";
  152.         // line 42
  153.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'42$this->source); })()), "challenger", [], "any"falsefalsefalse42), "pseudoname", [], "any"falsefalsefalse42), "html"nulltrue);
  154.         echo "</small>
  155.                                 <small class=\"text-white\">";
  156.         // line 43
  157.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'43$this->source); })()), "challenger", [], "any"falsefalsefalse43), "rank", [], "any"falsefalsefalse43), "html"nulltrue);
  158.         echo " RP</small>
  159.                             </div>
  160.                             <div class=\"play-button\" data-id=\"";
  161.         // line 45
  162.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'45$this->source); })()), "id", [], "any"falsefalsefalse45), "html"nulltrue);
  163.         echo "\" data-sample=\"";
  164.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'45$this->source); })()), "battleFileName", [], "any"falsefalsefalse45), "html"nulltrue);
  165.         echo "\">
  166.                                 <i class=\"bi bi-play-circle-fill text-white\" data-icon-id=\"";
  167.         // line 46
  168.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'46$this->source); })()), "id", [], "any"falsefalsefalse46), "html"nulltrue);
  169.         echo "\"></i>
  170.                             </div>
  171.                             <div class=\"time-info position-absolute pt-4\">
  172.                                 <small class=\"text-white\">";
  173.         // line 49
  174.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'49$this->source); })()), "oponnent", [], "any"falsefalsefalse49), "pseudoname", [], "any"falsefalsefalse49), "html"nulltrue);
  175.         echo "</small>
  176.                                 <small class=\"text-white\">";
  177.         // line 50
  178.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'50$this->source); })()), "oponnent", [], "any"falsefalsefalse50), "rank", [], "any"falsefalsefalse50), "html"nulltrue);
  179.         echo " RP</small>
  180.                             </div>
  181.                         </div>
  182.                     </div>
  183.                 </div>
  184.                 <button class=\"js-btn-vote col-1 mb-4 btn btn-outline btn-vote\" data-type=\"oponnent\" data-battle-id=\"";
  185.         // line 56
  186.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'56$this->source); })()), "id", [], "any"falsefalsefalse56), "html"nulltrue);
  187.         echo "\" data-rapper-id=\"";
  188.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'56$this->source); })()), "oponnent", [], "any"falsefalsefalse56), "id", [], "any"falsefalsefalse56), "html"nulltrue);
  189.         echo "\" data-user-logged=\"";
  190.         if (twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'56$this->source); })()), "user", [], "any"falsefalsefalse56)) {
  191.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'56$this->source); })()), "user", [], "any"falsefalsefalse56), "id", [], "any"falsefalsefalse56), "html"nulltrue);
  192.         } else {
  193.             echo "false";
  194.         }
  195.         echo "\" ";
  196.         if (twig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'56$this->source); })()), "isFinished", [], "any"falsefalsefalse56)) {
  197.             echo "disabled";
  198.         }
  199.         echo ">
  200.                     <div class=\"icon\">
  201.                         <i class=\"bi bi-hand-thumbs-up\"></i>
  202.                         <small>";
  203.         // line 59
  204.         echo twig_escape_filter($this->env$this->extensions['App\Extensions\VoteTwigExtensions']->getBattleVotesOponnent((isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'59$this->source); })())), "html"nulltrue);
  205.         echo "x</small>
  206.                     </div>
  207.                 </button>
  208.             </div>
  209.             <div class=\"row\">
  210.                 <div class=\"col-md-6\">
  211.                     <div class=\"card mb-4 mb-md-0\">
  212.                         <div class=\"card-body\">
  213.                             <h5 class=\"mb-4\"> Battle details
  214.                             </h5>
  215.                             <p class=\"mb-1\" style=\"font-size: .77rem;\">Beat</p>
  216.                             <p class=\"mb-4\">";
  217.         // line 71
  218.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'71$this->source); })()), "beat", [], "any"falsefalsefalse71), "author", [], "any"falsefalsefalse71), "pseudoname", [], "any"falsefalsefalse71), "html"nulltrue);
  219.         echo " - ";
  220.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'71$this->source); })()), "beat", [], "any"falsefalsefalse71), "name", [], "any"falsefalsefalse71), "html"nulltrue);
  221.         echo "</p>
  222.                             <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Battle ends in</p>
  223.                             ";
  224.         // line 74
  225.         if ((twig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'74$this->source); })()), "isFinished", [], "any"falsefalsefalse74) == false)) {
  226.             // line 75
  227.             echo "                            <p class=\"js-battle-ends mb-4\" data-enddate=\"";
  228.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'75$this->source); })()), "battleEnds", [], "any"falsefalsefalse75), "d/m/Y H:i:s"), "html"nulltrue);
  229.             echo "\">
  230.                                 <span id=\"days\"></span>
  231.                                 <span id=\"hours\"></span>
  232.                                 <span id=\"minutes\"></span>
  233.                                 <span id=\"seconds\"></span>
  234.                             </p>
  235.                             ";
  236.         } else {
  237.             // line 82
  238.             echo "                                <p>Finished</p>
  239.                             ";
  240.         }
  241.         // line 84
  242.         echo "                            <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Created</p>
  243.                             <p class=\"mb-4\" >";
  244.         // line 85
  245.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'85$this->source); })()), "createdAt", [], "any"falsefalsefalse85), "d/m/Y H:i:s"), "html"nulltrue);
  246.         echo "</p>
  247.                             <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Votes</p>
  248.                             <p class=\"mb-4\" >";
  249.         // line 88
  250.         echo twig_escape_filter($this->envtwig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'88$this->source); })()), "allVotes", [], "any"falsefalsefalse88)), "html"nulltrue);
  251.         echo "x</p>
  252.                         </div>
  253.                     </div>
  254.                 </div>
  255.                 <div class=\"col-md-6\">
  256.                     <div class=\"card mb-4 mb-md-0\">
  257.                         <div class=\"card-body\">
  258.                             <h5 class=\"mb-4\">
  259.                                 Comments
  260.                             </h5>
  261.                             <div class=\"comments-wrapper\">
  262.                                 <div class=\"comments-body\">
  263.                                     ";
  264.         // line 103
  265.         echo "                                    ";
  266.         // line 104
  267.         echo "                                    ";
  268.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'104$this->source); })()), "comments", [], "any"falsefalsefalse104)) > 0)) {
  269.             // line 105
  270.             echo "                                        ";
  271.             $context['_parent'] = $context;
  272.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'105$this->source); })()), "comments", [], "any"falsefalsefalse105));
  273.             foreach ($context['_seq'] as $context["_key"] => $context["comment"]) {
  274.                 // line 106
  275.                 echo "                                            ";
  276.                 if ((twig_get_attribute($this->env$this->source$context["comment"], "replyCommentRoot", [], "any"falsefalsefalse106) == null)) {
  277.                     // line 107
  278.                     echo "                                                ";
  279.                     echo twig_call_macro($macros["macros"], "macro_renderComment", [$context["comment"]], 107$context$this->getSourceContext());
  280.                     echo "
  281.                                                 ";
  282.                     // line 108
  283.                     echo twig_call_macro($macros["macros"], "macro_renderPostBattleCommentForm", [(isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'108$this->source); })()), true$context["comment"]], 108$context$this->getSourceContext());
  284.                     echo "
  285.                                             ";
  286.                 }
  287.                 // line 110
  288.                 echo "                                            ";
  289.                 if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source$context["comment"], "replies", [], "any"falsefalsefalse110)) > 0)) {
  290.                     // line 111
  291.                     echo "                                                ";
  292.                     $context['_parent'] = $context;
  293.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["comment"], "replies", [], "any"falsefalsefalse111));
  294.                     foreach ($context['_seq'] as $context["_key"] => $context["replyComment"]) {
  295.                         // line 112
  296.                         echo "                                                    ";
  297.                         echo twig_call_macro($macros["macros"], "macro_renderComment", [$context["replyComment"]], 112$context$this->getSourceContext());
  298.                         echo "
  299.                                                     ";
  300.                         // line 113
  301.                         echo twig_call_macro($macros["macros"], "macro_renderPostBattleCommentForm", [(isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'113$this->source); })()), true$context["replyComment"]], 113$context$this->getSourceContext());
  302.                         echo "
  303.                                                 ";
  304.                     }
  305.                     $_parent $context['_parent'];
  306.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['replyComment'], $context['_parent'], $context['loop']);
  307.                     $context array_intersect_key($context$_parent) + $_parent;
  308.                     // line 115
  309.                     echo "                                            ";
  310.                 }
  311.                 // line 116
  312.                 echo "                                        ";
  313.             }
  314.             $_parent $context['_parent'];
  315.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['comment'], $context['_parent'], $context['loop']);
  316.             $context array_intersect_key($context$_parent) + $_parent;
  317.             // line 117
  318.             echo "                                    ";
  319.         } else {
  320.             // line 118
  321.             echo "                                        <div class=\"no-items\">
  322.                                             <p class=\"text-center pt-3\">No comments yet </p>
  323.                                         </div>
  324.                                     ";
  325.         }
  326.         // line 122
  327.         echo "                                </div>
  328.                                 <hr/>
  329.                                 ";
  330.         // line 125
  331.         if ((twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'125$this->source); })()), "user", [], "any"falsefalsefalse125) != null)) {
  332.             // line 126
  333.             echo "                                    ";
  334.             echo twig_call_macro($macros["macros"], "macro_renderPostBattleCommentForm", [(isset($context["battle"]) || array_key_exists("battle"$context) ? $context["battle"] : (function () { throw new RuntimeError('Variable "battle" does not exist.'126$this->source); })()), false], 126$context$this->getSourceContext());
  335.             echo "
  336.                                 ";
  337.         } else {
  338.             // line 128
  339.             echo "                                    <p class=\"text-center\"><a href=\"";
  340.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("login");
  341.             echo "\">Log in</a> if you want to leave comment on this battle.</p>
  342.                                 ";
  343.         }
  344.         // line 130
  345.         echo "                            </div>
  346.                         </div>
  347.                     </div>
  348.                 </div>
  349.             </div>
  350.         </div>
  351.     </section>
  352. ";
  353.         
  354.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  355.         
  356.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  357.     }
  358.     /**
  359.      * @codeCoverageIgnore
  360.      */
  361.     public function getTemplateName()
  362.     {
  363.         return "pages/battle-detail.html.twig";
  364.     }
  365.     /**
  366.      * @codeCoverageIgnore
  367.      */
  368.     public function isTraitable()
  369.     {
  370.         return false;
  371.     }
  372.     /**
  373.      * @codeCoverageIgnore
  374.      */
  375.     public function getDebugInfo()
  376.     {
  377.         return array (  381 => 130,  375 => 128,  369 => 126,  367 => 125,  362 => 122,  356 => 118,  353 => 117,  347 => 116,  344 => 115,  336 => 113,  331 => 112,  326 => 111,  323 => 110,  318 => 108,  313 => 107,  310 => 106,  305 => 105,  302 => 104,  300 => 103,  283 => 88,  277 => 85,  274 => 84,  270 => 82,  259 => 75,  257 => 74,  249 => 71,  234 => 59,  216 => 56,  207 => 50,  203 => 49,  197 => 46,  191 => 45,  186 => 43,  182 => 42,  177 => 40,  164 => 30,  159 => 28,  154 => 26,  145 => 20,  127 => 17,  118 => 13,  111 => 8,  101 => 7,  82 => 3,  63 => 2,  52 => 1,  50 => 4,  37 => 1,);
  378.     }
  379.     public function getSourceContext()
  380.     {
  381.         return new Source("{% extends \"base.html.twig\" %}
  382. {% block title %}Battle detail{% endblock %}
  383. {% block bodyClass %}battleBody{% endblock %}
  384. {% import \"components/macros.html.twig\" as macros %}
  385. {% block body %}
  386.     <section id=\"battles\" class=\"battles mb-5\">
  387.         <div class=\"container\">
  388.             <div class=\"row\">
  389.                 <div class=\"col-12 heading\">
  390.                     <h2><span class=\"text-success text-bold\">{{ battle.challenger.pseudoname }}</span> <span class=\"text-muted\">vs.</span> <span class=\"text-danger text-bold\">{{ battle.oponnent.pseudoname }}</span></h2>
  391.                 </div>
  392.             </div>
  393.             <div class=\"row\">
  394.                 <button class=\"js-btn-vote col-1 mb-4 btn btn-outline btn-vote\" data-type=\"challenger\" data-battle-id=\"{{ battle.id }}\" data-rapper-id=\"{{ battle.challenger.id }}\" data-user-logged=\"{% if app.user %}true{% else %}false{% endif %}\" {% if battle.isFinished %}disabled{% endif %}>
  395.                     <div class=\"icon\">
  396.                         <i class=\"bi bi-hand-thumbs-up\"></i>
  397.                         <small>{{ getBattleVotesChallenger(battle) }}x</small>
  398.                     </div>
  399.                 </button>
  400.                 <div class=\"card battle-card mb-4 box-shadow position-relative col-10\">
  401.                     <div class=\"card-bg-players position-absolute\">
  402.                         <div class=\"card-player-left\">
  403.                             <img src=\"{{ asset(\"uploads/images/rappers/\"~ battle.challenger.avatarName) }}\" alt=\"Challenger\"/>
  404.                         </div>
  405.                         <img src=\"{{ asset(\"build/images/VS-BIG.png\") }}\" class=\"card-player-mid\" alt=\"Divider\"/>
  406.                         <div class=\"card-player-right\">
  407.                             <img src=\"{{ asset(\"uploads/images/rappers/\"~ battle.oponnent.avatarName) }}\"  alt=\"Opponent\"/>
  408.                         </div>
  409.                     </div>
  410.                     <div class=\"card-controls position-absolute\">
  411.                         <div class=\"card-bottom-controls detail\">
  412.                             <div class=\"playingIndicator\" data-indicator-id='{{ battle.id }}' style='--piWidth: 0%;'></div>
  413.                             <div class=\"card-voting-controls position-absolute pt-4\">
  414.                                 <small class=\"text-white\">{{ battle.challenger.pseudoname }}</small>
  415.                                 <small class=\"text-white\">{{ battle.challenger.rank }} RP</small>
  416.                             </div>
  417.                             <div class=\"play-button\" data-id=\"{{ battle.id }}\" data-sample=\"{{ battle.battleFileName }}\">
  418.                                 <i class=\"bi bi-play-circle-fill text-white\" data-icon-id=\"{{ battle.id }}\"></i>
  419.                             </div>
  420.                             <div class=\"time-info position-absolute pt-4\">
  421.                                 <small class=\"text-white\">{{ battle.oponnent.pseudoname }}</small>
  422.                                 <small class=\"text-white\">{{ battle.oponnent.rank }} RP</small>
  423.                             </div>
  424.                         </div>
  425.                     </div>
  426.                 </div>
  427.                 <button class=\"js-btn-vote col-1 mb-4 btn btn-outline btn-vote\" data-type=\"oponnent\" data-battle-id=\"{{ battle.id }}\" data-rapper-id=\"{{ battle.oponnent.id }}\" data-user-logged=\"{% if app.user %}{{ app.user.id }}{% else %}false{% endif %}\" {% if battle.isFinished %}disabled{% endif %}>
  428.                     <div class=\"icon\">
  429.                         <i class=\"bi bi-hand-thumbs-up\"></i>
  430.                         <small>{{ getBattleVotesOponnent(battle) }}x</small>
  431.                     </div>
  432.                 </button>
  433.             </div>
  434.             <div class=\"row\">
  435.                 <div class=\"col-md-6\">
  436.                     <div class=\"card mb-4 mb-md-0\">
  437.                         <div class=\"card-body\">
  438.                             <h5 class=\"mb-4\"> Battle details
  439.                             </h5>
  440.                             <p class=\"mb-1\" style=\"font-size: .77rem;\">Beat</p>
  441.                             <p class=\"mb-4\">{{ battle.beat.author.pseudoname }} - {{ battle.beat.name }}</p>
  442.                             <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Battle ends in</p>
  443.                             {% if battle.isFinished == false %}
  444.                             <p class=\"js-battle-ends mb-4\" data-enddate=\"{{ battle.battleEnds|date(\"d/m/Y H:i:s\") }}\">
  445.                                 <span id=\"days\"></span>
  446.                                 <span id=\"hours\"></span>
  447.                                 <span id=\"minutes\"></span>
  448.                                 <span id=\"seconds\"></span>
  449.                             </p>
  450.                             {% else %}
  451.                                 <p>Finished</p>
  452.                             {% endif %}
  453.                             <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Created</p>
  454.                             <p class=\"mb-4\" >{{ battle.createdAt|date(\"d/m/Y H:i:s\") }}</p>
  455.                             <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Votes</p>
  456.                             <p class=\"mb-4\" >{{ battle.allVotes|length }}x</p>
  457.                         </div>
  458.                     </div>
  459.                 </div>
  460.                 <div class=\"col-md-6\">
  461.                     <div class=\"card mb-4 mb-md-0\">
  462.                         <div class=\"card-body\">
  463.                             <h5 class=\"mb-4\">
  464.                                 Comments
  465.                             </h5>
  466.                             <div class=\"comments-wrapper\">
  467.                                 <div class=\"comments-body\">
  468.                                     {# @var \\App\\Entity\\BattleComment comment #}
  469.                                     {# @var \\App\\Entity\\BattleComment replyComment #}
  470.                                     {% if battle.comments|length>0 %}
  471.                                         {% for comment in battle.comments %}
  472.                                             {% if comment.replyCommentRoot == null %}
  473.                                                 {{ macros.renderComment(comment) }}
  474.                                                 {{ macros.renderPostBattleCommentForm(battle,true,comment) }}
  475.                                             {% endif %}
  476.                                             {% if comment.replies| length > 0 %}
  477.                                                 {% for replyComment in comment.replies %}
  478.                                                     {{ macros.renderComment(replyComment) }}
  479.                                                     {{ macros.renderPostBattleCommentForm(battle,true,replyComment) }}
  480.                                                 {% endfor %}
  481.                                             {% endif %}
  482.                                         {% endfor %}
  483.                                     {% else %}
  484.                                         <div class=\"no-items\">
  485.                                             <p class=\"text-center pt-3\">No comments yet </p>
  486.                                         </div>
  487.                                     {% endif %}
  488.                                 </div>
  489.                                 <hr/>
  490.                                 {% if app.user != null %}
  491.                                     {{ macros.renderPostBattleCommentForm(battle,false) }}
  492.                                 {% else %}
  493.                                     <p class=\"text-center\"><a href=\"{{ path('login') }}\">Log in</a> if you want to leave comment on this battle.</p>
  494.                                 {% endif %}
  495.                             </div>
  496.                         </div>
  497.                     </div>
  498.                 </div>
  499.             </div>
  500.         </div>
  501.     </section>
  502. {% endblock %}""pages/battle-detail.html.twig""/home/u568363158/domains/rapbattleonline.com/public_html/templates/pages/battle-detail.html.twig");
  503.     }
  504. }