<?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;
/* navs/web/topnav.html.twig */
class __TwigTemplate_1ede012f88d681962e808cb96f00ff40 extends \Twig\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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "navs/web/topnav.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "navs/web/topnav.html.twig"));
// line 1
echo "<div class=\"container\">
<nav class=\"navbar navbar-expand-lg navbar-light uw-top-main-nav\">
<a class=\"navbar-brand mr-0\" href=\"";
// line 3
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_homepage");
echo "\">
<img src=\"";
// line 4
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("client-assets/logo_cziml.svg"), "html", null, true);
echo "\" height=\"100\" alt=\"\">
</a>
<button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarTogglerTopnav\" aria-controls=\"navbarTogglerTopnav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
<span class=\"navbar-toggler-icon\"></span>
</button>
<div class=\"collapse navbar-collapse\" id=\"navbarTogglerTopnav\">
";
// line 16
echo "
<ul class=\"navbar-nav ml-auto\">
";
// line 20
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 21
echo " \t<li class=\"nav-item dropdown\">
<a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"userDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">
<i class=\"fas fa-user-circle\" aria-hidden=\"true\"></i>
";
// line 25
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, true, false, 25), "email", [], "any", true, true, false, 25)) {
echo "
";
// line 26
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.', 26, $this->source); })()), "user", [], "any", false, false, false, 26), "email", [], "any", false, false, false, 26), "html", null, true);
echo "
";
} else {
// line 28
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.', 28, $this->source); })()), "user", [], "any", false, false, false, 28), "username", [], "any", false, false, false, 28), "html", null, true);
echo "
";
}
// line 29
echo "
</a>
<div class=\"dropdown-menu\" aria-labelledby=\"navbarDropdown\">
";
// line 32
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
// line 33
echo " \t<a class=\"dropdown-item\" href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_admin_index");
echo "\"> Administrace</a>
\t\t\t<div class=\"dropdown-divider\"></div>
\t\t";
}
// line 36
echo "\t\t";
if ( !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
echo "\t
\t\t\t<a class=\"dropdown-item\" href=\"";
// line 37
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_show");
echo "\">Můj účet</a>
\t\t";
}
// line 38
echo "\t
<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>
</div>
\t</li>
";
} else {
// line 43
echo " ";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 44
echo " <li class=\"nav-item\">
<a class=\"nav-link main-header\" href=\"";
// line 45
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_homepage");
echo "\">Hlavní strana</a>
</li>
<li class=\"nav-item\">
<a class=\"nav-link main-header\" href=\"http://cziml.kutululu.cz/adresar\">Adresář členů</a>
</li>
";
// line 53
echo " \t";
}
// line 54
echo " ";
}
// line 55
echo " </ul>
</div>
</nav>
</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "navs/web/topnav.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("<div class=\"container\">
<nav class=\"navbar navbar-expand-lg navbar-light uw-top-main-nav\">
<a class=\"navbar-brand mr-0\" href=\"{{ path('app_homepage') }}\">
<img src=\"{{ asset('client-assets/logo_cziml.svg') }}\" height=\"100\" alt=\"\">
</a>
<button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarTogglerTopnav\" aria-controls=\"navbarTogglerTopnav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
<span class=\"navbar-toggler-icon\"></span>
</button>
<div class=\"collapse navbar-collapse\" id=\"navbarTogglerTopnav\">
{# <ul class=\"navbar-nav ml-5 mr-auto mt-2 mt-lg-0\">
<li class=\"nav-item\">
<a class=\"nav-link\" href=\"{{ path('app_homepage') }}\">Home</a>
</li>
</ul>#}
<ul class=\"navbar-nav ml-auto\">
{% if is_granted('ROLE_USER') %}
\t<li class=\"nav-item dropdown\">
<a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"userDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">
<i class=\"fas fa-user-circle\" aria-hidden=\"true\"></i>
{% if app.user.email is defined %}
{{ app.user.email }}
{% else %}
{{ app.user.username }}
{% endif %}
</a>
<div class=\"dropdown-menu\" aria-labelledby=\"navbarDropdown\">
{% if is_granted('ROLE_ADMIN') %}
\t<a class=\"dropdown-item\" href=\"{{ path('app_admin_index') }}\"> Administrace</a>
\t\t\t<div class=\"dropdown-divider\"></div>
\t\t{% endif %}
\t\t{% if not is_granted('ROLE_ADMIN') %}\t
\t\t\t<a class=\"dropdown-item\" href=\"{{ path('profile_show') }}\">Můj účet</a>
\t\t{% endif %}\t
<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>
</div>
\t</li>
{% else %}
{% if is_granted('ROLE_USER') %}
<li class=\"nav-item\">
<a class=\"nav-link main-header\" href=\"{{ path('app_homepage') }}\">Hlavní strana</a>
</li>
<li class=\"nav-item\">
<a class=\"nav-link main-header\" href=\"http://cziml.kutululu.cz/adresar\">Adresář členů</a>
</li>
{# <li class=\"nav-item\">
\t<a class=\"nav-link\" href=\"{{ path(constant('Umimeweby\\\\UWLoginUserBundle\\\\Service\\\\Security\\\\RouteProvider\\\\BasicRouteProvider::DEFAULT_LOGIN_FORM_ROUTE')) }}\">Přihlásit se</a>
\t</li>#}
\t{% endif %}
{% endif %}
</ul>
</div>
</nav>
</div>", "navs/web/topnav.html.twig", "/home/horskaskola/public_html/templates/navs/web/topnav.html.twig");
}
}