<?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;
/* navbar.html.twig */
class __TwigTemplate_fa186adf25f27155eaddbb49c58c1f9b244aff323bae8b0b6cd0782a5668e1a0 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "navbar.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "navbar.html.twig"));
// line 1
$context["route"] = 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.', 1, $this->source); })()), "request", [], "any", false, false, false, 1), "attributes", [], "any", false, false, false, 1), "get", [0 => "_route"], "method", false, false, false, 1);
// line 2
$context["route_params"] = 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.', 2, $this->source); })()), "request", [], "any", false, false, false, 2), "attributes", [], "any", false, false, false, 2), "get", [0 => "_route_params"], "method", false, false, false, 2);
// line 3
$context["params"] = twig_array_merge((isset($context["route_params"]) || array_key_exists("route_params", $context) ? $context["route_params"] : (function () { throw new RuntimeError('Variable "route_params" does not exist.', 3, $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.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), "query", [], "any", false, false, false, 3), "all", [], "any", false, false, false, 3));
// line 4
echo "<nav class=\"navbar navbar-expand-lg navbar-light bg-light navbar-fixed-top\">
<a class=\"navbar-brand\" rel=\"home\" href=\"";
// line 5
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_home");
echo "\" title=\"Sulser Group\">
<img style=\"max-width:120px; margin-top: -7px;\"
src=\"/images/Sulser-Logo.svg\">
</a>
<button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarText\" aria-controls=\"navbarText\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
<span class=\"navbar-toggler-icon\"></span>
</button>
<div class=\"collapse navbar-collapse\" id=\"navbarText\">
<ul class=\"navbar-nav mr-auto\">
</ul>
<ul class=\"navbar-nav navbar-right\">
<li class=\"nav-item\">
<a class=\"nav-link\" href=\"";
// line 17
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 17, $this->source); })()), twig_array_merge((isset($context["params"]) || array_key_exists("params", $context) ? $context["params"] : (function () { throw new RuntimeError('Variable "params" does not exist.', 17, $this->source); })()), ["_locale" => "de"])), "html", null, true);
echo "\">
<button type=\"button\" class=\"mb-1\" aria-label=\"DE\">
<span aria-hidden=\"true\" class=\"text-white bg-success px-1\">DE</span>
</button>
</a>
</li>
<li class=\"nav-item\">
<a class=\"nav-link\" href=\"";
// line 24
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 24, $this->source); })()), twig_array_merge((isset($context["params"]) || array_key_exists("params", $context) ? $context["params"] : (function () { throw new RuntimeError('Variable "params" does not exist.', 24, $this->source); })()), ["_locale" => "fr"])), "html", null, true);
echo "\">
<button type=\"button\" class=\"mb-1\" aria-label=\"FR\">
<span aria-hidden=\"true\" class=\"text-white bg-danger px-1\">FR</span>
</button>
</a>
</li>
";
// line 30
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.', 30, $this->source); })()), "user", [], "any", false, false, false, 30)) {
// line 31
echo " <li class=\"nav-item dropdown\">
<a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"navbarDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">
<i class=\"fa fa-user mr-2\"></i>";
// line 33
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.', 33, $this->source); })()), "user", [], "any", false, false, false, 33), "username", [], "any", false, false, false, 33), "html", null, true);
echo "
</a>
<div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"navbarDropdown\">
<a class=\"dropdown-item\" href=\"#\">";
// line 36
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.', 36, $this->source); })()), "user", [], "any", false, false, false, 36), "firstname", [], "any", false, false, false, 36), "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["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 36, $this->source); })()), "user", [], "any", false, false, false, 36), "lastname", [], "any", false, false, false, 36), "html", null, true);
echo "</a>
";
// line 37
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_INSTRUCTOR")) {
// line 38
echo " <a class=\"dropdown-item\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_userabsences", ["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.', 38, $this->source); })()), "user", [], "any", false, false, false, 38), "getAddressRoleID", [0 => 3], "method", false, false, false, 38)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("absences"), "html", null, true);
echo "</a>
";
}
// line 40
echo " <a class=\"dropdown-item\" href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_changepass");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("change_password"), "html", null, true);
echo "</a>
<div class=\"dropdown-divider\"></div>
<a class=\"dropdown-item\" href=\"";
// line 42
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("logout"), "html", null, true);
echo "</a>
</div>
</li>
";
} else {
// line 46
echo " <li class=\"nav-item\">
<a class=\"nav-link\" href=\"";
// line 47
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
echo "\"><i class=\"fa fa-user mr-2\"></i>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sign_in"), "html", null, true);
echo "</a>
</li>
";
}
// line 50
echo " </ul>
</div>
</nav>
<hr class=\"my-0\">
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "navbar.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 142 => 50, 134 => 47, 131 => 46, 122 => 42, 114 => 40, 106 => 38, 104 => 37, 98 => 36, 92 => 33, 88 => 31, 86 => 30, 77 => 24, 67 => 17, 52 => 5, 49 => 4, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% set route = app.request.attributes.get('_route') %}
{% set route_params = app.request.attributes.get('_route_params') %}
{% set params = route_params|merge(app.request.query.all) %}
<nav class=\"navbar navbar-expand-lg navbar-light bg-light navbar-fixed-top\">
<a class=\"navbar-brand\" rel=\"home\" href=\"{{ path('app_home') }}\" title=\"Sulser Group\">
<img style=\"max-width:120px; margin-top: -7px;\"
src=\"/images/Sulser-Logo.svg\">
</a>
<button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarText\" aria-controls=\"navbarText\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
<span class=\"navbar-toggler-icon\"></span>
</button>
<div class=\"collapse navbar-collapse\" id=\"navbarText\">
<ul class=\"navbar-nav mr-auto\">
</ul>
<ul class=\"navbar-nav navbar-right\">
<li class=\"nav-item\">
<a class=\"nav-link\" href=\"{{ path(route, params|merge({ _locale: 'de' })) }}\">
<button type=\"button\" class=\"mb-1\" aria-label=\"DE\">
<span aria-hidden=\"true\" class=\"text-white bg-success px-1\">DE</span>
</button>
</a>
</li>
<li class=\"nav-item\">
<a class=\"nav-link\" href=\"{{ path(route, params|merge({ _locale: 'fr' })) }}\">
<button type=\"button\" class=\"mb-1\" aria-label=\"FR\">
<span aria-hidden=\"true\" class=\"text-white bg-danger px-1\">FR</span>
</button>
</a>
</li>
{% if app.user %}
<li class=\"nav-item dropdown\">
<a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"navbarDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">
<i class=\"fa fa-user mr-2\"></i>{{ app.user.username }}
</a>
<div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"navbarDropdown\">
<a class=\"dropdown-item\" href=\"#\">{{ app.user.firstname }} {{ app.user.lastname}}</a>
{% if is_granted('ROLE_INSTRUCTOR') %}
<a class=\"dropdown-item\" href=\"{{ path('app_userabsences', {'id': app.user.getAddressRoleID(3)}) }}\">{{ 'absences'|trans }}</a>
{% endif %}
<a class=\"dropdown-item\" href=\"{{ path('app_changepass') }}\">{{ 'change_password'|trans }}</a>
<div class=\"dropdown-divider\"></div>
<a class=\"dropdown-item\" href=\"{{ path('app_logout') }}\">{{ 'logout'|trans }}</a>
</div>
</li>
{% else %}
<li class=\"nav-item\">
<a class=\"nav-link\" href=\"{{ path('app_login') }}\"><i class=\"fa fa-user mr-2\"></i>{{ 'sign_in'|trans }}</a>
</li>
{% endif %}
</ul>
</div>
</nav>
<hr class=\"my-0\">
", "navbar.html.twig", "/var/www/sulser.smt-web09b.swissmains.net/SMT_Sulser/sulser/templates/navbar.html.twig");
}
}