src/Tutorka/Bundle/CoreBundle/Resources/views/sideNavbarContent.inner.html.twig line 1

Open in your IDE?
  1. {% trans_default_domain 'layout' %}
    
    
    {% if orders_enabled %}
        {% if app.user and app.user.isTeacher %}
            {% set routesUserArea = [
                'user_dashboard',
                'user_personal_data',
                'user_photo',
                'user_about_me',
                'user_addresses',
                'user_subscription_dashboard',
                'user_password_login',
                'user_notifications',
                'user_change_email',
                'user_cancel_account',
                'user_rating_received',
                'user_rating_granted',
                'user_my_advert_offers_published',
                'user_my_advert_offers_hidden',
                'user_my_advert_demands',
                'user_order_purchase_list',
                'user_order_sell_list',
                'user_wallet_dashboard',
                'user_watch_dog'
            ] %}
        {% else %}
            {% set routesUserArea = [
                'user_dashboard',
                'user_personal_data',
                'user_photo',
                'user_about_me',
                'user_addresses',
                'user_subscription_dashboard',
                'user_password_login',
                'user_notifications',
                'user_change_email',
                'user_cancel_account',
                'user_rating_received',
                'user_rating_granted',
                'user_my_advert_demands',
                'user_order_purchase_list',
                'user_order_sell_list',
                'user_wallet_dashboard',
                'user_watch_dog'
            ] %}
        {% endif %}
    {% else %}
        {% if app.user and app.user.isTeacher %}
            {% set routesUserArea = [
                'user_dashboard',
                'user_personal_data',
                'user_photo',
                'user_about_me',
                'user_password_login',
                'user_notifications',
                'user_change_email',
                'user_cancel_account',
                'user_rating_received',
                'user_rating_granted',
                'user_my_advert_offers_published',
                'user_my_advert_offers_hidden',
                'user_my_advert_demands',
                'user_watch_dog'
            ] %}
        {% else %}
            {% set routesUserArea = [
                'user_dashboard',
                'user_personal_data',
                'user_photo',
                'user_about_me',
                'user_password_login',
                'user_notifications',
                'user_change_email',
                'user_cancel_account',
                'user_rating_received',
                'user_rating_granted',
                'user_my_advert_demands',
                'user_watch_dog'
            ] %}
        {% endif %}
    {% endif %}
    
    
    <nav class="navbar-toggle-bg"></nav>
    <div class="navbar-side">
        <div class="navbar-side-header">
            <div class="navbar-side-content">
                <div class="brand-header">
                    <button class="navbar-toggler toggler-close text-white">
                        <i class="fas fa-times"></i>
                    </button>
                    <a class="navbar-brand navbar-brand-side" href="{{ path('homepage') }}">
                        <img src="{{ asset('build/images/logo_white.svg') }}" alt="Tutorka">
                    </a>
                    <span class="d-block"></span>
                </div>
            </div>
        </div>
        <div class="navbar-side-content">
            {% if is_granted('IS_AUTHENTICATED_FULLY') %}
                {% if app.request.attributes.get('_route') in routesUserArea %}
                    {{ include('@TutorkaUser/User/userNavbar.inner.html.twig') }}
                    <hr>
                {% endif %}
            {% endif %}
            <div class="card side-navbar-wrapper mb-5">
                <ul class="list-group list-group-flush">
                    <li class="list-group-item side-navbar-item">
                        <a href="{{ path('advert_list') }}" class="card-link">
                            <i class="fas fa-graduation-cap"></i> {{ 'navbar.advert.list.offers'|trans }}
                        </a>
                    </li>
                    <li class="list-group-item side-navbar-item">
                        <a href="{{ path('advert_offer_add') }}" class="card-link">
                            <i class="fas fa-plus-circle"></i> {{ 'navbar.advert.add'|trans }}
                        </a>
                    </li>
                    {% if not is_granted('IS_AUTHENTICATED_FULLY') %}
                        <li class="list-group-item side-navbar-item">
                            <a href="{{ path('login') }}" class="card-link">
                                <i class="fas fa-lock"></i> {{ 'navbar.user.login'|trans }}
                            </a>
                        </li>
                        <li class="list-group-item side-navbar-item">
                            <a href="{{ path('register') }}" class="card-link">
                                <i class="fas fa-user"></i> {{ 'navbar.user.register'|trans }}
                            </a>
                        </li>
                    {% else %}
                        {% if app.request.attributes.get('_route') not in routesUserArea %}
                            <li class="list-group-item side-navbar-item hidden-desktop">
                                <a href="{{ path('user_personal_data') }}" class="card-link"><i class="fas fa-id-card-alt"></i> {{ 'navbar.user.myAccount'|trans }}</a>
                            </li>
                        {% endif %}
                        {% if app.user.isTeacher %}
                            <li class="list-group-item side-navbar-item">
                                <a href="{{ path('user_my_advert_offers_published') }}" class="card-link">
                                    <i class="fas fa-user-graduate"></i> {{ 'navbar.user.myAdverts'|trans }}
                                </a>
                            </li>
                        {% else %}
                            <li class="list-group-item side-navbar-item">
                                <a href="{{ path('user_my_advert_demands') }}" class="card-link">
                                    <i class="fas fa-user-graduate"></i> {{ 'navbar.user.myAdverts'|trans }}
                                </a>
                            </li>
                        {% endif %}
                        <li class="list-group-item side-navbar-item">
                            <a href="{{ path('logout') }}" class="card-link">
                                <i class="fas fa-sign-out-alt"></i> {{ 'navbar.user.logout'|trans }}
                            </a>
                        </li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </div>