{% trans_default_domain 'layout' %}
{{ render(controller('App\\Tutorka\\Bundle\\CoreBundle\\Controller\\SearchController::mobileSearchAction', {'extended': app.request.attributes.get('_route') == 'advert_list'})) }}
<nav class="navbar navbar-expand-lg navbar-dark main-horizontal-navbar bg-primary-gradient {{ navbarClasses }}">
<div class="{{ navbarContainerClasses }}">
<button class="navbar-toggler text-white">
<i class="fas fa-bars navbar-toggle-icon"></i>
</button>
<a class="navbar-brand navbar-tutorka-logo" href="{{ path('homepage') }}">
<img src="{{ asset('build/images/logo_white.svg') }}" alt="">
</a>
{{ include('@TutorkaCore/navbarContent.inner.html.twig') }}
{{ include('@TutorkaCore/sideNavbarContent.inner.html.twig') }}
<ul class="navbar-nav main-vertical-navbar hidden-mobile">
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
{# TODO: notifications #}
{# <li class="nav-item">#}
{# <a class="nav-link" href="#">#}
{# <i class="fas fa-bell"></i>#}
{# </a>#}
{# </li>#}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle mainNavbar__avatarLink" href="#" id="userSubnavbar"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="{{ app.user.avatarUrl ?: asset('build/images/avatar.png') }}" class="mainNavbar__avatar"
alt="{{ app.user.firstName }}">
<span class="mainNavbar__avatarTitle">{{ app.user.firstName }}</span>
</a>
<div class="dropdown-menu dropdown-menu-right position-absolute mt-2" aria-labelledby="userSubnavbar">
<div class="dropdown-arrow-up"></div>
{% if app.user.isTeacher and app.user.hasVerifiedEmail %}
<a class="dropdown-item" href="{{ path('user_profile', {'username': app.user.username }) }}">
<span class="far fa-user-circle"></span>
{{ 'navbar.user.showProfile'|trans }}
</a>
{% endif %}
<a class="dropdown-item" href="{{ path('user_dashboard') }}">
<span class="far fa-user-circle"></span>
{{ 'navbar.user.dashboard'|trans }}
</a>
<a class="dropdown-item" href="{{ path('user_personal_data') }}">
<span class="fas fa-user-cog"></span>
{{ 'navbar.user.myAccount'|trans }}
</a>
{% if app.user.isTeacher %}
<a class="dropdown-item" href="{{ path('user_my_advert_offers_published') }}">
<span class="fas fa-graduation-cap"></span>
{{ 'navbar.user.myAdverts'|trans }}
</a>
{% else %}
<a class="dropdown-item" href="{{ path('user_my_advert_demands') }}">
<span class="fas fa-graduation-cap"></span>
{{ 'navbar.user.myAdverts'|trans }}
</a>
{% endif %}
{% if is_granted('ROLE_ADMIN') %}
<a class="dropdown-item" href="{{ path('admin_dashboard') }}">
<span class="fas fa-wrench"></span>
{{ 'navbar.user.adminDashboard'|trans }}
</a>
{% endif %}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ path('logout') }}">
<span class="fas fa-sign-out-alt text-danger"></span>
{{ 'navbar.user.logout'|trans }}
</a>
</div>
</li>
{# {% else %}#}
{# <li class="nav-item">#}
{# <a class="nav-link" href="{{ path('login') }}">#}
{# {{ 'navbar.user.login'|trans }}#}
{# </a>#}
{# </li>#}
{% endif %}
</ul>
<ul class="navbar-nav flex-row main-vertical-navbar hidden-desktop">
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
<li class="nav-item">
<a class="nav-link mainNavbar__avatarLink" href="{{ path('user_dashboard') }}">
<img src="{{ app.user.avatarUrl ?: asset('build/images/avatar.png') }}" class="mainNavbar__avatar mr-3"
alt="{{ app.user.firstName }}">
</a>
</li>
{% endif %}
<li class="nav-item">
<a class="nav-link btn-mobile-search" href="#">
<i class="fas fa-search search-icon"></i>
</a>
</li>
</ul>
</div>
</nav>
{#{% if is_granted('IS_AUTHENTICATED_FULLY') %}#}
{# {{ include('@TutorkaCore/navbarBottom.html.twig') }}#}
{#{% endif %}#}