<?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;
/* pages/battle-detail.html.twig */
class __TwigTemplate_a0ad49ee9364dc116261618ab055dbe2 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'bodyClass' => [$this, 'block_bodyClass'],
'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", "pages/battle-detail.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/battle-detail.html.twig"));
// line 4
$macros["macros"] = $this->macros["macros"] = $this->loadTemplate("components/macros.html.twig", "pages/battle-detail.html.twig", 4)->unwrap();
// line 1
$this->parent = $this->loadTemplate("base.html.twig", "pages/battle-detail.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 2
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 "Battle detail";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 3
public function block_bodyClass($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", "bodyClass"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyClass"));
echo "battleBody";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 7
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 8
echo "
<section id=\"battles\" class=\"battles mb-5\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12 heading\">
<h2><span class=\"text-success text-bold\">";
// line 13
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 13, $this->source); })()), "challenger", [], "any", false, false, false, 13), "pseudoname", [], "any", false, false, false, 13), "html", null, true);
echo "</span> <span class=\"text-muted\">vs.</span> <span class=\"text-danger text-bold\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 13, $this->source); })()), "oponnent", [], "any", false, false, false, 13), "pseudoname", [], "any", false, false, false, 13), "html", null, true);
echo "</span></h2>
</div>
</div>
<div class=\"row\">
<button class=\"js-btn-vote col-1 mb-4 btn btn-outline btn-vote\" data-type=\"challenger\" data-battle-id=\"";
// line 17
echo twig_escape_filter($this->env, 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); })()), "id", [], "any", false, false, false, 17), "html", null, true);
echo "\" data-rapper-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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); })()), "challenger", [], "any", false, false, false, 17), "id", [], "any", false, false, false, 17), "html", null, true);
echo "\" data-user-logged=\"";
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", false, false, false, 17)) {
echo "true";
} else {
echo "false";
}
echo "\" ";
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", false, false, false, 17)) {
echo "disabled";
}
echo ">
<div class=\"icon\">
<i class=\"bi bi-hand-thumbs-up\"></i>
<small>";
// line 20
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", null, true);
echo "x</small>
</div>
</button>
<div class=\"card battle-card mb-4 box-shadow position-relative col-10\">
<div class=\"card-bg-players position-absolute\">
<div class=\"card-player-left\">
<img src=\"";
// line 26
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/images/rappers/" . twig_get_attribute($this->env, $this->source, 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.', 26, $this->source); })()), "challenger", [], "any", false, false, false, 26), "avatarName", [], "any", false, false, false, 26))), "html", null, true);
echo "\" alt=\"Challenger\"/>
</div>
<img src=\"";
// line 28
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/VS-BIG.png"), "html", null, true);
echo "\" class=\"card-player-mid\" alt=\"Divider\"/>
<div class=\"card-player-right\">
<img src=\"";
// line 30
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/images/rappers/" . twig_get_attribute($this->env, $this->source, 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.', 30, $this->source); })()), "oponnent", [], "any", false, false, false, 30), "avatarName", [], "any", false, false, false, 30))), "html", null, true);
echo "\" alt=\"Opponent\"/>
</div>
</div>
<div class=\"card-controls position-absolute\">
<div class=\"card-bottom-controls detail\">
<div class=\"playingIndicator\" data-indicator-id='";
// line 40
echo twig_escape_filter($this->env, 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.', 40, $this->source); })()), "id", [], "any", false, false, false, 40), "html", null, true);
echo "' style='--piWidth: 0%;'></div>
<div class=\"card-voting-controls position-absolute pt-4\">
<small class=\"text-white\">";
// line 42
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 42, $this->source); })()), "challenger", [], "any", false, false, false, 42), "pseudoname", [], "any", false, false, false, 42), "html", null, true);
echo "</small>
<small class=\"text-white\">";
// line 43
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 43, $this->source); })()), "challenger", [], "any", false, false, false, 43), "rank", [], "any", false, false, false, 43), "html", null, true);
echo " RP</small>
</div>
<div class=\"play-button\" data-id=\"";
// line 45
echo twig_escape_filter($this->env, 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.', 45, $this->source); })()), "id", [], "any", false, false, false, 45), "html", null, true);
echo "\" data-sample=\"";
echo twig_escape_filter($this->env, 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.', 45, $this->source); })()), "battleFileName", [], "any", false, false, false, 45), "html", null, true);
echo "\">
<i class=\"bi bi-play-circle-fill text-white\" data-icon-id=\"";
// line 46
echo twig_escape_filter($this->env, 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.', 46, $this->source); })()), "id", [], "any", false, false, false, 46), "html", null, true);
echo "\"></i>
</div>
<div class=\"time-info position-absolute pt-4\">
<small class=\"text-white\">";
// line 49
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 49, $this->source); })()), "oponnent", [], "any", false, false, false, 49), "pseudoname", [], "any", false, false, false, 49), "html", null, true);
echo "</small>
<small class=\"text-white\">";
// line 50
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 50, $this->source); })()), "oponnent", [], "any", false, false, false, 50), "rank", [], "any", false, false, false, 50), "html", null, true);
echo " RP</small>
</div>
</div>
</div>
</div>
<button class=\"js-btn-vote col-1 mb-4 btn btn-outline btn-vote\" data-type=\"oponnent\" data-battle-id=\"";
// line 56
echo twig_escape_filter($this->env, 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); })()), "id", [], "any", false, false, false, 56), "html", null, true);
echo "\" data-rapper-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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); })()), "oponnent", [], "any", false, false, false, 56), "id", [], "any", false, false, false, 56), "html", null, true);
echo "\" data-user-logged=\"";
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", false, false, false, 56)) {
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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", false, false, false, 56), "id", [], "any", false, false, false, 56), "html", null, true);
} else {
echo "false";
}
echo "\" ";
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", false, false, false, 56)) {
echo "disabled";
}
echo ">
<div class=\"icon\">
<i class=\"bi bi-hand-thumbs-up\"></i>
<small>";
// line 59
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", null, true);
echo "x</small>
</div>
</button>
</div>
<div class=\"row\">
<div class=\"col-md-6\">
<div class=\"card mb-4 mb-md-0\">
<div class=\"card-body\">
<h5 class=\"mb-4\"> Battle details
</h5>
<p class=\"mb-1\" style=\"font-size: .77rem;\">Beat</p>
<p class=\"mb-4\">";
// line 71
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 71, $this->source); })()), "beat", [], "any", false, false, false, 71), "author", [], "any", false, false, false, 71), "pseudoname", [], "any", false, false, false, 71), "html", null, true);
echo " - ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 71, $this->source); })()), "beat", [], "any", false, false, false, 71), "name", [], "any", false, false, false, 71), "html", null, true);
echo "</p>
<p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Battle ends in</p>
";
// line 74
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", false, false, false, 74) == false)) {
// line 75
echo " <p class=\"js-battle-ends mb-4\" data-enddate=\"";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, 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.', 75, $this->source); })()), "battleEnds", [], "any", false, false, false, 75), "d/m/Y H:i:s"), "html", null, true);
echo "\">
<span id=\"days\"></span>
<span id=\"hours\"></span>
<span id=\"minutes\"></span>
<span id=\"seconds\"></span>
</p>
";
} else {
// line 82
echo " <p>Finished</p>
";
}
// line 84
echo " <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Created</p>
<p class=\"mb-4\" >";
// line 85
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, 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.', 85, $this->source); })()), "createdAt", [], "any", false, false, false, 85), "d/m/Y H:i:s"), "html", null, true);
echo "</p>
<p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Votes</p>
<p class=\"mb-4\" >";
// line 88
echo twig_escape_filter($this->env, twig_length_filter($this->env, 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.', 88, $this->source); })()), "allVotes", [], "any", false, false, false, 88)), "html", null, true);
echo "x</p>
</div>
</div>
</div>
<div class=\"col-md-6\">
<div class=\"card mb-4 mb-md-0\">
<div class=\"card-body\">
<h5 class=\"mb-4\">
Comments
</h5>
<div class=\"comments-wrapper\">
<div class=\"comments-body\">
";
// line 103
echo " ";
// line 104
echo " ";
if ((twig_length_filter($this->env, 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.', 104, $this->source); })()), "comments", [], "any", false, false, false, 104)) > 0)) {
// line 105
echo " ";
$context['_parent'] = $context;
$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", false, false, false, 105));
foreach ($context['_seq'] as $context["_key"] => $context["comment"]) {
// line 106
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["comment"], "replyCommentRoot", [], "any", false, false, false, 106) == null)) {
// line 107
echo " ";
echo twig_call_macro($macros["macros"], "macro_renderComment", [$context["comment"]], 107, $context, $this->getSourceContext());
echo "
";
// line 108
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());
echo "
";
}
// line 110
echo " ";
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["comment"], "replies", [], "any", false, false, false, 110)) > 0)) {
// line 111
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["comment"], "replies", [], "any", false, false, false, 111));
foreach ($context['_seq'] as $context["_key"] => $context["replyComment"]) {
// line 112
echo " ";
echo twig_call_macro($macros["macros"], "macro_renderComment", [$context["replyComment"]], 112, $context, $this->getSourceContext());
echo "
";
// line 113
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());
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['replyComment'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 115
echo " ";
}
// line 116
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['comment'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 117
echo " ";
} else {
// line 118
echo " <div class=\"no-items\">
<p class=\"text-center pt-3\">No comments yet </p>
</div>
";
}
// line 122
echo " </div>
<hr/>
";
// line 125
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", false, false, false, 125) != null)) {
// line 126
echo " ";
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());
echo "
";
} else {
// line 128
echo " <p class=\"text-center\"><a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("login");
echo "\">Log in</a> if you want to leave comment on this battle.</p>
";
}
// line 130
echo " </div>
</div>
</div>
</div>
</div>
</div>
</section>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "pages/battle-detail.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends \"base.html.twig\" %}
{% block title %}Battle detail{% endblock %}
{% block bodyClass %}battleBody{% endblock %}
{% import \"components/macros.html.twig\" as macros %}
{% block body %}
<section id=\"battles\" class=\"battles mb-5\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12 heading\">
<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>
</div>
</div>
<div class=\"row\">
<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 %}>
<div class=\"icon\">
<i class=\"bi bi-hand-thumbs-up\"></i>
<small>{{ getBattleVotesChallenger(battle) }}x</small>
</div>
</button>
<div class=\"card battle-card mb-4 box-shadow position-relative col-10\">
<div class=\"card-bg-players position-absolute\">
<div class=\"card-player-left\">
<img src=\"{{ asset(\"uploads/images/rappers/\"~ battle.challenger.avatarName) }}\" alt=\"Challenger\"/>
</div>
<img src=\"{{ asset(\"build/images/VS-BIG.png\") }}\" class=\"card-player-mid\" alt=\"Divider\"/>
<div class=\"card-player-right\">
<img src=\"{{ asset(\"uploads/images/rappers/\"~ battle.oponnent.avatarName) }}\" alt=\"Opponent\"/>
</div>
</div>
<div class=\"card-controls position-absolute\">
<div class=\"card-bottom-controls detail\">
<div class=\"playingIndicator\" data-indicator-id='{{ battle.id }}' style='--piWidth: 0%;'></div>
<div class=\"card-voting-controls position-absolute pt-4\">
<small class=\"text-white\">{{ battle.challenger.pseudoname }}</small>
<small class=\"text-white\">{{ battle.challenger.rank }} RP</small>
</div>
<div class=\"play-button\" data-id=\"{{ battle.id }}\" data-sample=\"{{ battle.battleFileName }}\">
<i class=\"bi bi-play-circle-fill text-white\" data-icon-id=\"{{ battle.id }}\"></i>
</div>
<div class=\"time-info position-absolute pt-4\">
<small class=\"text-white\">{{ battle.oponnent.pseudoname }}</small>
<small class=\"text-white\">{{ battle.oponnent.rank }} RP</small>
</div>
</div>
</div>
</div>
<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 %}>
<div class=\"icon\">
<i class=\"bi bi-hand-thumbs-up\"></i>
<small>{{ getBattleVotesOponnent(battle) }}x</small>
</div>
</button>
</div>
<div class=\"row\">
<div class=\"col-md-6\">
<div class=\"card mb-4 mb-md-0\">
<div class=\"card-body\">
<h5 class=\"mb-4\"> Battle details
</h5>
<p class=\"mb-1\" style=\"font-size: .77rem;\">Beat</p>
<p class=\"mb-4\">{{ battle.beat.author.pseudoname }} - {{ battle.beat.name }}</p>
<p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Battle ends in</p>
{% if battle.isFinished == false %}
<p class=\"js-battle-ends mb-4\" data-enddate=\"{{ battle.battleEnds|date(\"d/m/Y H:i:s\") }}\">
<span id=\"days\"></span>
<span id=\"hours\"></span>
<span id=\"minutes\"></span>
<span id=\"seconds\"></span>
</p>
{% else %}
<p>Finished</p>
{% endif %}
<p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Created</p>
<p class=\"mb-4\" >{{ battle.createdAt|date(\"d/m/Y H:i:s\") }}</p>
<p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Votes</p>
<p class=\"mb-4\" >{{ battle.allVotes|length }}x</p>
</div>
</div>
</div>
<div class=\"col-md-6\">
<div class=\"card mb-4 mb-md-0\">
<div class=\"card-body\">
<h5 class=\"mb-4\">
Comments
</h5>
<div class=\"comments-wrapper\">
<div class=\"comments-body\">
{# @var \\App\\Entity\\BattleComment comment #}
{# @var \\App\\Entity\\BattleComment replyComment #}
{% if battle.comments|length>0 %}
{% for comment in battle.comments %}
{% if comment.replyCommentRoot == null %}
{{ macros.renderComment(comment) }}
{{ macros.renderPostBattleCommentForm(battle,true,comment) }}
{% endif %}
{% if comment.replies| length > 0 %}
{% for replyComment in comment.replies %}
{{ macros.renderComment(replyComment) }}
{{ macros.renderPostBattleCommentForm(battle,true,replyComment) }}
{% endfor %}
{% endif %}
{% endfor %}
{% else %}
<div class=\"no-items\">
<p class=\"text-center pt-3\">No comments yet </p>
</div>
{% endif %}
</div>
<hr/>
{% if app.user != null %}
{{ macros.renderPostBattleCommentForm(battle,false) }}
{% else %}
<p class=\"text-center\"><a href=\"{{ path('login') }}\">Log in</a> if you want to leave comment on this battle.</p>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
{% endblock %}", "pages/battle-detail.html.twig", "/home/u568363158/domains/rapbattleonline.com/public_html/templates/pages/battle-detail.html.twig");
}
}