var/cache/dev/twig/fc/fcf147739a442cf735353c53a9415f9b542d7d541bc611522219d70599aed73b.php line 33

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. /* navbar.html.twig */
  14. class __TwigTemplate_fa186adf25f27155eaddbb49c58c1f9b244aff323bae8b0b6cd0782a5668e1a0 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->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""navbar.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""navbar.html.twig"));
  33.         // line 1
  34.         $context["route"] = twig_get_attribute($this->env$this->sourcetwig_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.'1$this->source); })()), "request", [], "any"falsefalsefalse1), "attributes", [], "any"falsefalsefalse1), "get", [=> "_route"], "method"falsefalsefalse1);
  35.         // line 2
  36.         $context["route_params"] = twig_get_attribute($this->env$this->sourcetwig_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.'2$this->source); })()), "request", [], "any"falsefalsefalse2), "attributes", [], "any"falsefalsefalse2), "get", [=> "_route_params"], "method"falsefalsefalse2);
  37.         // line 3
  38.         $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->sourcetwig_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.'3$this->source); })()), "request", [], "any"falsefalsefalse3), "query", [], "any"falsefalsefalse3), "all", [], "any"falsefalsefalse3));
  39.         // line 4
  40.         echo "<nav class=\"navbar navbar-expand-lg navbar-light bg-light navbar-fixed-top\">
  41.   <a class=\"navbar-brand\" rel=\"home\" href=\"";
  42.         // line 5
  43.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_home");
  44.         echo "\" title=\"Sulser Group\">
  45.       <img style=\"max-width:120px; margin-top: -7px;\"
  46.             src=\"/images/Sulser-Logo.svg\">
  47.   </a>
  48.   <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarText\" aria-controls=\"navbarText\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
  49.     <span class=\"navbar-toggler-icon\"></span>
  50.   </button>
  51.   <div class=\"collapse navbar-collapse\" id=\"navbarText\">
  52.     <ul class=\"navbar-nav mr-auto\">
  53.     </ul>
  54.     <ul class=\"navbar-nav navbar-right\"> 
  55.       <li class=\"nav-item\">
  56.         <a class=\"nav-link\" href=\"";
  57.         // line 17
  58.         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"nulltrue);
  59.         echo "\">
  60.           <button type=\"button\" class=\"mb-1\"  aria-label=\"DE\">
  61.             <span aria-hidden=\"true\" class=\"text-white bg-success px-1\">DE</span>
  62.           </button>
  63.         </a>
  64.       </li>    
  65.       <li class=\"nav-item\">
  66.         <a class=\"nav-link\" href=\"";
  67.         // line 24
  68.         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"nulltrue);
  69.         echo "\">
  70.           <button type=\"button\" class=\"mb-1\"  aria-label=\"FR\">
  71.             <span aria-hidden=\"true\" class=\"text-white bg-danger px-1\">FR</span>
  72.           </button>
  73.         </a>
  74.       </li>  
  75.       ";
  76.         // line 30
  77.         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"falsefalsefalse30)) {
  78.             // line 31
  79.             echo "      <li class=\"nav-item dropdown\">
  80.         <a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"navbarDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">
  81.           <i class=\"fa fa-user mr-2\"></i>";
  82.             // line 33
  83.             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.'33$this->source); })()), "user", [], "any"falsefalsefalse33), "username", [], "any"falsefalsefalse33), "html"nulltrue);
  84.             echo "
  85.         </a>
  86.         <div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"navbarDropdown\">
  87.           <a class=\"dropdown-item\" href=\"#\">";
  88.             // line 36
  89.             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.'36$this->source); })()), "user", [], "any"falsefalsefalse36), "firstname", [], "any"falsefalsefalse36), "html"nulltrue);
  90.             echo " ";
  91.             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.'36$this->source); })()), "user", [], "any"falsefalsefalse36), "lastname", [], "any"falsefalsefalse36), "html"nulltrue);
  92.             echo "</a>
  93.           ";
  94.             // line 37
  95.             if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_INSTRUCTOR")) {
  96.                 // line 38
  97.                 echo "            <a class=\"dropdown-item\" href=\"";
  98.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_userabsences", ["id" => twig_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.'38$this->source); })()), "user", [], "any"falsefalsefalse38), "getAddressRoleID", [=> 3], "method"falsefalsefalse38)]), "html"nulltrue);
  99.                 echo "\">";
  100.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("absences"), "html"nulltrue);
  101.                 echo "</a>
  102.           ";
  103.             }
  104.             // line 40
  105.             echo "          <a class=\"dropdown-item\" href=\"";
  106.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_changepass");
  107.             echo "\">";
  108.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("change_password"), "html"nulltrue);
  109.             echo "</a>
  110.           <div class=\"dropdown-divider\"></div>
  111.           <a class=\"dropdown-item\" href=\"";
  112.             // line 42
  113.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
  114.             echo "\">";
  115.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("logout"), "html"nulltrue);
  116.             echo "</a>
  117.         </div>
  118.       </li>
  119.       ";
  120.         } else {
  121.             // line 46
  122.             echo "      <li class=\"nav-item\">
  123.         <a class=\"nav-link\" href=\"";
  124.             // line 47
  125.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
  126.             echo "\"><i class=\"fa fa-user mr-2\"></i>";
  127.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sign_in"), "html"nulltrue);
  128.             echo "</a>
  129.       </li>
  130.       ";
  131.         }
  132.         // line 50
  133.         echo "    </ul>  
  134.   </div>
  135. </nav>
  136. <hr class=\"my-0\">
  137. ";
  138.         
  139.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  140.         
  141.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  142.     }
  143.     public function getTemplateName()
  144.     {
  145.         return "navbar.html.twig";
  146.     }
  147.     public function isTraitable()
  148.     {
  149.         return false;
  150.     }
  151.     public function getDebugInfo()
  152.     {
  153.         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,);
  154.     }
  155.     public function getSourceContext()
  156.     {
  157.         return new Source("{% set route = app.request.attributes.get('_route') %}
  158. {% set route_params = app.request.attributes.get('_route_params') %}
  159. {% set params = route_params|merge(app.request.query.all) %}
  160. <nav class=\"navbar navbar-expand-lg navbar-light bg-light navbar-fixed-top\">
  161.   <a class=\"navbar-brand\" rel=\"home\" href=\"{{ path('app_home') }}\" title=\"Sulser Group\">
  162.       <img style=\"max-width:120px; margin-top: -7px;\"
  163.             src=\"/images/Sulser-Logo.svg\">
  164.   </a>
  165.   <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarText\" aria-controls=\"navbarText\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
  166.     <span class=\"navbar-toggler-icon\"></span>
  167.   </button>
  168.   <div class=\"collapse navbar-collapse\" id=\"navbarText\">
  169.     <ul class=\"navbar-nav mr-auto\">
  170.     </ul>
  171.     <ul class=\"navbar-nav navbar-right\"> 
  172.       <li class=\"nav-item\">
  173.         <a class=\"nav-link\" href=\"{{ path(route, params|merge({ _locale: 'de' })) }}\">
  174.           <button type=\"button\" class=\"mb-1\"  aria-label=\"DE\">
  175.             <span aria-hidden=\"true\" class=\"text-white bg-success px-1\">DE</span>
  176.           </button>
  177.         </a>
  178.       </li>    
  179.       <li class=\"nav-item\">
  180.         <a class=\"nav-link\" href=\"{{ path(route, params|merge({ _locale: 'fr' })) }}\">
  181.           <button type=\"button\" class=\"mb-1\"  aria-label=\"FR\">
  182.             <span aria-hidden=\"true\" class=\"text-white bg-danger px-1\">FR</span>
  183.           </button>
  184.         </a>
  185.       </li>  
  186.       {% if app.user %}
  187.       <li class=\"nav-item dropdown\">
  188.         <a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"navbarDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">
  189.           <i class=\"fa fa-user mr-2\"></i>{{ app.user.username }}
  190.         </a>
  191.         <div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"navbarDropdown\">
  192.           <a class=\"dropdown-item\" href=\"#\">{{ app.user.firstname }} {{ app.user.lastname}}</a>
  193.           {% if is_granted('ROLE_INSTRUCTOR') %}
  194.             <a class=\"dropdown-item\" href=\"{{ path('app_userabsences', {'id': app.user.getAddressRoleID(3)}) }}\">{{ 'absences'|trans }}</a>
  195.           {% endif %}
  196.           <a class=\"dropdown-item\" href=\"{{ path('app_changepass') }}\">{{ 'change_password'|trans }}</a>
  197.           <div class=\"dropdown-divider\"></div>
  198.           <a class=\"dropdown-item\" href=\"{{ path('app_logout') }}\">{{ 'logout'|trans }}</a>
  199.         </div>
  200.       </li>
  201.       {% else %}
  202.       <li class=\"nav-item\">
  203.         <a class=\"nav-link\" href=\"{{ path('app_login') }}\"><i class=\"fa fa-user mr-2\"></i>{{ 'sign_in'|trans }}</a>
  204.       </li>
  205.       {% endif %}
  206.     </ul>  
  207.   </div>
  208. </nav>
  209. <hr class=\"my-0\">
  210. ""navbar.html.twig""/var/www/sulser.smt-web09b.swissmains.net/SMT_Sulser/sulser/templates/navbar.html.twig");
  211.     }
  212. }