var/cache/dev/twig/bb/bb60e15a4852def2160205c04547fc3e.php line 67

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. /* navs/web/topnav.html.twig */
  14. class __TwigTemplate_1ede012f88d681962e808cb96f00ff40 extends \Twig\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_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""navs/web/topnav.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""navs/web/topnav.html.twig"));
  33.         // line 1
  34.         echo "<div class=\"container\">
  35. <nav class=\"navbar navbar-expand-lg navbar-light uw-top-main-nav\">
  36.         <a class=\"navbar-brand mr-0\" href=\"";
  37.         // line 3
  38.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_homepage");
  39.         echo "\">
  40.             <img src=\"";
  41.         // line 4
  42.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("client-assets/logo_cziml.svg"), "html"nulltrue);
  43.         echo "\" height=\"100\" alt=\"\">
  44.         </a>
  45.         <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarTogglerTopnav\" aria-controls=\"navbarTogglerTopnav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
  46.             <span class=\"navbar-toggler-icon\"></span>
  47.         </button>
  48.         <div class=\"collapse navbar-collapse\" id=\"navbarTogglerTopnav\">
  49. ";
  50.         // line 16
  51.         echo "            
  52.             
  53.     <ul class=\"navbar-nav ml-auto\">   
  54.     
  55.         ";
  56.         // line 20
  57.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  58.             // line 21
  59.             echo "      \t<li class=\"nav-item dropdown\">
  60.             <a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"userDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">
  61.               <i class=\"fas fa-user-circle\" aria-hidden=\"true\"></i>
  62.                 ";
  63.             // line 25
  64.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "user", [], "any"falsetruefalse25), "email", [], "any"truetruefalse25)) {
  65.                 echo "  
  66.                     ";
  67.                 // line 26
  68.                 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.'26$this->source); })()), "user", [], "any"falsefalsefalse26), "email", [], "any"falsefalsefalse26), "html"nulltrue);
  69.                 echo "
  70.                 ";
  71.             } else {
  72.                 // line 28
  73.                 echo "                    ";
  74.                 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.'28$this->source); })()), "user", [], "any"falsefalsefalse28), "username", [], "any"falsefalsefalse28), "html"nulltrue);
  75.                 echo 
  76.                 ";
  77.             }
  78.             // line 29
  79.             echo "               
  80.             </a>
  81.         <div class=\"dropdown-menu\" aria-labelledby=\"navbarDropdown\">
  82.         ";
  83.             // line 32
  84.             if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  85.                 // line 33
  86.                 echo "        \t<a class=\"dropdown-item\" href=\"";
  87.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_admin_index");
  88.                 echo "\"> Administrace</a>
  89. \t\t\t<div class=\"dropdown-divider\"></div>
  90. \t\t";
  91.             }
  92.             // line 36
  93.             echo "\t\t";
  94.             if ( !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  95.                 echo "\t
  96. \t\t\t<a class=\"dropdown-item\" href=\"";
  97.                 // line 37
  98.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_show");
  99.                 echo "\">Můj účet</a>
  100. \t\t";
  101.             }
  102.             // line 38
  103.             echo "\t
  104.             <a class=\"dropdown-item confirm\" href=\"/logout\" data-title=\"Opravdu se chcete odhlásit?\"><i class=\"fas fa-sign-out-alt\"></i> Odhlásit se</a>
  105.         </div>
  106.       \t</li>
  107.         ";
  108.         } else {
  109.             // line 43
  110.             echo "        ";
  111.             if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  112.                 // line 44
  113.                 echo "        <li class=\"nav-item\">
  114.             <a class=\"nav-link main-header\" href=\"";
  115.                 // line 45
  116.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_homepage");
  117.                 echo "\">Hlavní strana</a>
  118.         </li>
  119.         <li class=\"nav-item\">
  120.             <a class=\"nav-link main-header\" href=\"http://cziml.kutululu.cz/adresar\">Adresář členů</a>
  121.         </li>
  122. ";
  123.                 // line 53
  124.                 echo "    \t";
  125.             }
  126.             // line 54
  127.             echo "        ";
  128.         }
  129.         // line 55
  130.         echo "     </ul>
  131.         </div>
  132.     </nav>
  133. </div>";
  134.         
  135.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  136.         
  137.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  138.     }
  139.     public function getTemplateName()
  140.     {
  141.         return "navs/web/topnav.html.twig";
  142.     }
  143.     public function isTraitable()
  144.     {
  145.         return false;
  146.     }
  147.     public function getDebugInfo()
  148.     {
  149.         return array (  141 => 55,  138 => 54,  135 => 53,  127 => 45,  124 => 44,  121 => 43,  114 => 38,  109 => 37,  104 => 36,  97 => 33,  95 => 32,  90 => 29,  84 => 28,  79 => 26,  75 => 25,  69 => 21,  67 => 20,  61 => 16,  51 => 4,  47 => 3,  43 => 1,);
  150.     }
  151.     public function getSourceContext()
  152.     {
  153.         return new Source("<div class=\"container\">
  154. <nav class=\"navbar navbar-expand-lg navbar-light uw-top-main-nav\">
  155.         <a class=\"navbar-brand mr-0\" href=\"{{ path('app_homepage') }}\">
  156.             <img src=\"{{ asset('client-assets/logo_cziml.svg') }}\" height=\"100\" alt=\"\">
  157.         </a>
  158.         <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarTogglerTopnav\" aria-controls=\"navbarTogglerTopnav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
  159.             <span class=\"navbar-toggler-icon\"></span>
  160.         </button>
  161.         <div class=\"collapse navbar-collapse\" id=\"navbarTogglerTopnav\">
  162. {#            <ul class=\"navbar-nav ml-5 mr-auto mt-2 mt-lg-0\">
  163.                 <li class=\"nav-item\">
  164.                     <a class=\"nav-link\" href=\"{{ path('app_homepage') }}\">Home</a>
  165.                 </li>
  166.             </ul>#}
  167.             
  168.             
  169.     <ul class=\"navbar-nav ml-auto\">   
  170.     
  171.         {% if is_granted('ROLE_USER') %}
  172.       \t<li class=\"nav-item dropdown\">
  173.             <a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"userDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">
  174.               <i class=\"fas fa-user-circle\" aria-hidden=\"true\"></i>
  175.                 {% if app.user.email is defined %}  
  176.                     {{ app.user.email  }}
  177.                 {% else %}
  178.                     {{ app.user.username  }} 
  179.                 {% endif %}               
  180.             </a>
  181.         <div class=\"dropdown-menu\" aria-labelledby=\"navbarDropdown\">
  182.         {% if is_granted('ROLE_ADMIN') %}
  183.         \t<a class=\"dropdown-item\" href=\"{{ path('app_admin_index') }}\"> Administrace</a>
  184. \t\t\t<div class=\"dropdown-divider\"></div>
  185. \t\t{% endif %}
  186. \t\t{% if not is_granted('ROLE_ADMIN') %}\t
  187. \t\t\t<a class=\"dropdown-item\" href=\"{{ path('profile_show') }}\">Můj účet</a>
  188. \t\t{% endif %}\t
  189.             <a class=\"dropdown-item confirm\" href=\"/logout\" data-title=\"Opravdu se chcete odhlásit?\"><i class=\"fas fa-sign-out-alt\"></i> Odhlásit se</a>
  190.         </div>
  191.       \t</li>
  192.         {% else %}
  193.         {% if is_granted('ROLE_USER') %}
  194.         <li class=\"nav-item\">
  195.             <a class=\"nav-link main-header\" href=\"{{ path('app_homepage') }}\">Hlavní strana</a>
  196.         </li>
  197.         <li class=\"nav-item\">
  198.             <a class=\"nav-link main-header\" href=\"http://cziml.kutululu.cz/adresar\">Adresář členů</a>
  199.         </li>
  200. {#        <li class=\"nav-item\">
  201.          \t<a class=\"nav-link\" href=\"{{ path(constant('Umimeweby\\\\UWLoginUserBundle\\\\Service\\\\Security\\\\RouteProvider\\\\BasicRouteProvider::DEFAULT_LOGIN_FORM_ROUTE')) }}\">Přihlásit se</a>
  202.     \t</li>#}
  203.     \t{% endif %}
  204.         {% endif %}
  205.      </ul>
  206.         </div>
  207.     </nav>
  208. </div>""navs/web/topnav.html.twig""/home/horskaskola/public_html/templates/navs/web/topnav.html.twig");
  209.     }
  210. }