<?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;
/* layout.html.twig */
class __TwigTemplate_bbef7d9a5a9be5aea65d2ac342d1e12db2c4d95f01a0f54272b5497e44ccdb0b extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'whiplay_body_head' => [$this, 'block_whiplay_body_head'],
];
}
protected function doGetParent(array $context)
{
// line 2
return $this->loadTemplate((((isset($context["isAjax"]) || array_key_exists("isAjax", $context) ? $context["isAjax"] : (function () { throw new RuntimeError('Variable "isAjax" does not exist.', 2, $this->source); })())) ? ("with_ajax_layout.html.twig") : ("no_ajax_layout.html.twig")), "layout.html.twig", 2);
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "layout.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "layout.html.twig"));
// line 1
$context["isAjax"] = $this->extensions['App\Extensions\UtilsExtension']->isAjaxRequest();
// line 2
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 4
public function block_whiplay_body_head($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "whiplay_body_head"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "whiplay_body_head"));
// line 5
echo " <div class=\"flash-messages\">
";
// line 6
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, 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.', 6, $this->source); })()), "session", [], "any", false, false, false, 6), "flashBag", [], "any", false, false, false, 6), "get", [0 => "notice"], "method", false, false, false, 6));
foreach ($context['_seq'] as $context["_key"] => $context["flash_message"]) {
// line 7
echo " <div class=\"notice\">
";
// line 8
echo twig_escape_filter($this->env, $context["flash_message"], "html", null, true);
echo "
<div class=\"timer\"></div>
<div class=\"close\" title=\"Fermer\">X</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['flash_message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, 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.', 13, $this->source); })()), "session", [], "any", false, false, false, 13), "flashBag", [], "any", false, false, false, 13), "get", [0 => "error"], "method", false, false, false, 13));
foreach ($context['_seq'] as $context["_key"] => $context["flash_message"]) {
// line 14
echo " <div class=\"error\">
";
// line 15
echo twig_escape_filter($this->env, $context["flash_message"], "html", null, true);
echo "
<div class=\"timer\"></div>
<div class=\"close\" title=\"Fermer\">X</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['flash_message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 20
echo " </div>
";
// line 22
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_REMEMBERED")) {
// line 23
echo " <div id=\"container-header-user\">
<h2>";
// line 24
echo $this->extensions['Sonata\SeoBundle\Twig\Extension\SeoExtension']->getTitleText();
echo "</h2>
<div class=\"container-menu-user\">
<div class=\"user-infos\" id=\"user-box\">
<div class=\"container-icons\">
<a class=\"left-menu-item\" href=\"";
// line 28
echo twig_escape_filter($this->env, $this->extensions['App\Extensions\AjaxPathExtension']->ajaxPath("whiplay_user_likes", ["id" => 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.', 28, $this->source); })()), "user", [], "any", false, false, false, 28), "id", [], "any", false, false, false, 28)]), "html", null, true);
echo "\">
<img alt=\"Mes favoris\" src=\"";
// line 29
echo twig_escape_filter($this->env, (isset($context["global_url"]) || array_key_exists("global_url", $context) ? $context["global_url"] : (function () { throw new RuntimeError('Variable "global_url" does not exist.', 29, $this->source); })()), "html", null, true);
echo "images/icons/heroicons/heart-primary-color.svg\" class=\"material-icons\">
</a>
</div>
<div class=\"container-icons\">
<a class=\"left-menu-item\" href=\"";
// line 33
echo twig_escape_filter($this->env, $this->extensions['App\Extensions\AjaxPathExtension']->ajaxPath("whiplay_action_subscriptions"), "html", null, true);
echo "\">
<img alt=\"Notification\" src=\"";
// line 34
echo twig_escape_filter($this->env, (isset($context["global_url"]) || array_key_exists("global_url", $context) ? $context["global_url"] : (function () { throw new RuntimeError('Variable "global_url" does not exist.', 34, $this->source); })()), "html", null, true);
echo "images/icons/heroicons/bell.svg\" class=\"material-icons\">
<span class=\"notifications-number ";
// line 35
echo (($this->extensions['App\Extensions\NotificationsExtension']->notificationNumber()) ? ("") : ("zero"));
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['App\Extensions\NotificationsExtension']->notificationNumber(), "html", null, true);
echo "</span>
</a>
</div>
<div class=\"container-user-picture\">
<img class=\"user-profile-picture-img\"
";
// line 41
if (twig_get_attribute($this->env, $this->source, 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.', 41, $this->source); })()), "user", [], "any", false, false, false, 41), "commonInformation", [], "any", false, false, false, 41), "profilePicture", [], "any", false, false, false, 41)) {
// line 42
echo " src=\"";
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 42, $this->source); })()), "user", [], "any", false, false, false, 42), "commonInformation", [], "any", false, false, false, 42), "profilePicture", [], "any", false, false, false, 42), "webPath", [], "any", false, false, false, 42), "thumb30x30"), "html", null, true);
echo "\"
alt=\"";
// line 43
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, 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.', 43, $this->source); })()), "user", [], "any", false, false, false, 43), "commonInformation", [], "any", false, false, false, 43), "profilePicture", [], "any", false, false, false, 43), "alt", [], "any", false, false, false, 43), "html", null, true);
echo "\"
";
} else {
// line 45
echo " id=\"left-menu-default-picture\"
src=\"";
// line 46
echo twig_escape_filter($this->env, (isset($context["global_url"]) || array_key_exists("global_url", $context) ? $context["global_url"] : (function () { throw new RuntimeError('Variable "global_url" does not exist.', 46, $this->source); })()), "html", null, true);
echo "images/icons/heroicons/user-circle.svg\"
alt=\"default profile picture\"
class=\"material-icons white\"
";
}
// line 50
echo " />
</div>
";
// line 55
echo " </div>
</div>
</div>
";
// line 62
echo " <div id=\"user-menu\">
<div class=\"return-menu-mobile\"><i class=\"material-icons\">arrow_back</i> Retour</div>
<a class=\"left-menu-item\" href=\"";
// line 64
echo twig_escape_filter($this->env, $this->extensions['App\Extensions\AjaxPathExtension']->ajaxPath("user_profile_show"), "html", null, true);
echo "\">
<div>";
// line 65
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.', 65, $this->source); })()), "user", [], "any", false, false, false, 65), "username", [], "any", false, false, false, 65), "html", null, true);
echo "</div>
</a>
<div class=\"separator\"></div>
<a class=\"left-menu-item\" href=\"";
// line 68
echo twig_escape_filter($this->env, $this->extensions['App\Extensions\AjaxPathExtension']->ajaxPath("user_profile_edit"), "html", null, true);
echo "\">
<div>";
// line 69
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.user.edit_profile"), "html", null, true);
echo "</div>
</a>
<a class=\"left-menu-item\" href=\"";
// line 72
echo twig_escape_filter($this->env, $this->extensions['App\Extensions\AjaxPathExtension']->ajaxPath("whiplay_collaboration_show"), "html", null, true);
echo "\">
<div>";
// line 73
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.user.collaboration"), "html", null, true);
echo "</div>
</a>
<div class=\"separator\"></div>
<a class=\"left-menu-item\" href=\"";
// line 76
echo twig_escape_filter($this->env, $this->extensions['App\Extensions\AjaxPathExtension']->ajaxPath("whiplay_management_legal_notice"), "html", null, true);
echo "\">
<div>";
// line 77
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.global.about"), "html", null, true);
echo "</div>
</a>
<a class=\"left-menu-item logout-link\" href=\"";
// line 79
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
echo "\"
title=\"";
// line 80
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("layout.logout", [], "users"), "html", null, true);
echo "\">
<div>";
// line 81
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("layout.logout", [], "users"), "html", null, true);
echo "</div>
</a>
</div>
";
}
// line 85
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "layout.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 248 => 85, 241 => 81, 237 => 80, 233 => 79, 228 => 77, 224 => 76, 218 => 73, 214 => 72, 208 => 69, 204 => 68, 198 => 65, 194 => 64, 190 => 62, 182 => 55, 178 => 50, 171 => 46, 168 => 45, 163 => 43, 158 => 42, 156 => 41, 145 => 35, 141 => 34, 137 => 33, 130 => 29, 126 => 28, 119 => 24, 116 => 23, 114 => 22, 110 => 20, 99 => 15, 96 => 14, 91 => 13, 80 => 8, 77 => 7, 73 => 6, 70 => 5, 60 => 4, 50 => 2, 48 => 1, 35 => 2,);
}
public function getSourceContext()
{
return new Source("{% set isAjax = is_ajax_request() %}
{% extends isAjax ? \"with_ajax_layout.html.twig\" : \"no_ajax_layout.html.twig\" %}
{% block whiplay_body_head %}
<div class=\"flash-messages\">
{% for flash_message in app.session.flashBag.get('notice') %}
<div class=\"notice\">
{{ flash_message }}
<div class=\"timer\"></div>
<div class=\"close\" title=\"Fermer\">X</div>
</div>
{% endfor %}
{% for flash_message in app.session.flashBag.get('error') %}
<div class=\"error\">
{{ flash_message }}
<div class=\"timer\"></div>
<div class=\"close\" title=\"Fermer\">X</div>
</div>
{% endfor %}
</div>
{% if is_granted(\"IS_AUTHENTICATED_REMEMBERED\") %}
<div id=\"container-header-user\">
<h2>{{ sonata_seo_title_text() }}</h2>
<div class=\"container-menu-user\">
<div class=\"user-infos\" id=\"user-box\">
<div class=\"container-icons\">
<a class=\"left-menu-item\" href=\"{{ 'whiplay_user_likes'|ajax_path( { 'id' : app.user.id }) }}\">
<img alt=\"Mes favoris\" src=\"{{ global_url }}images/icons/heroicons/heart-primary-color.svg\" class=\"material-icons\">
</a>
</div>
<div class=\"container-icons\">
<a class=\"left-menu-item\" href=\"{{ 'whiplay_action_subscriptions'|ajax_path }}\">
<img alt=\"Notification\" src=\"{{ global_url }}images/icons/heroicons/bell.svg\" class=\"material-icons\">
<span class=\"notifications-number {{ user_notifications_number() ? '' : 'zero' }}\">{{ user_notifications_number() }}</span>
</a>
</div>
<div class=\"container-user-picture\">
<img class=\"user-profile-picture-img\"
{% if app.user.commonInformation.profilePicture %}
src=\"{{ app.user.commonInformation.profilePicture.webPath|imagine_filter('thumb30x30') }}\"
alt=\"{{ app.user.commonInformation.profilePicture.alt }}\"
{% else %}
id=\"left-menu-default-picture\"
src=\"{{ global_url }}images/icons/heroicons/user-circle.svg\"
alt=\"default profile picture\"
class=\"material-icons white\"
{% endif %}
/>
</div>
{# <span class=\"messages-number {{ user_messages_number() ? '' : 'zero' }}\">
<i class=\"material-icons\">notifications_active</i>
</span> #}
</div>
</div>
</div>
{#USER SUBMENU #}
<div id=\"user-menu\">
<div class=\"return-menu-mobile\"><i class=\"material-icons\">arrow_back</i> Retour</div>
<a class=\"left-menu-item\" href=\"{{ 'user_profile_show'|ajax_path }}\">
<div>{{ app.user.username }}</div>
</a>
<div class=\"separator\"></div>
<a class=\"left-menu-item\" href=\"{{ 'user_profile_edit'|ajax_path }}\">
<div>{{ 'menu.user.edit_profile'|trans }}</div>
</a>
<a class=\"left-menu-item\" href=\"{{ 'whiplay_collaboration_show'|ajax_path }}\">
<div>{{ 'menu.user.collaboration'|trans }}</div>
</a>
<div class=\"separator\"></div>
<a class=\"left-menu-item\" href=\"{{ 'whiplay_management_legal_notice'|ajax_path }}\">
<div>{{ 'menu.global.about'|trans }}</div>
</a>
<a class=\"left-menu-item logout-link\" href=\"{{ path('app_logout') }}\"
title=\"{{ 'layout.logout'|trans({}, 'users') }}\">
<div>{{ 'layout.logout'|trans({}, 'users') }}</div>
</a>
</div>
{% endif %}
{% endblock %}
", "layout.html.twig", "/var/www/whiplay/whiplay/templates/layout.html.twig");
}
}