templates/front/Default/menu.html.twig line 33

Open in your IDE?
  1. <div class="blanc wrapper">
  2.     <div class="container padding-bottom-5 padding-off">
  3.       
  4.         <!-- LOGO -->
  5.         <div class="col-md-2 col-sm-2 padding-off-mobile">
  6.             <a href="{{ path('ac_platform_homepage') }}">
  7.                 <img src="{{ asset('build/images/front/logo-ateya.png')}}" class="img-responsive logo">
  8.             </a>
  9.         </div>
  10.         <!-- MENU  -->
  11.         <div class="col-md-7 col-sm-7 col-xs-12 menu-general">
  12.             <div class="navbar-header">
  13.                 <!-- NAVIGATION MOBILE-->
  14.                 <button aria-controls="bs-navbar" aria-expanded="false" class="navbar-toggle" data-target="#bs-navbar" data-toggle="collapse" type="button">
  15.                     <span class="sr-only">Toggle navigation</span>
  16.                     <span class="icon-bar"></span> <span class="icon-bar"></span>
  17.                     <span class="icon-bar"></span>
  18.                 </button>
  19.             </div>
  20.             <div id="menu-placeholder" class="visible-xs-block"></div>
  21.             <nav  class="navbar navbar-collapse collapse" id="bs-navbar" style="height:90px">
  22.                 <ul class="nav navbar-nav" class="padding-off ">
  23.                     <li>
  24.                         <div class="btn-group btn-group-block" role="group">
  25.                             <button class="sub-menu-btn btn-group-ateya" type="button" data-menu="menu-destinations" data-level="1">{{ 'menu.destinations' |trans({},'app') |raw }}
  26.                                 <span class="caret hidden-xs"></span>
  27.                                 <span class="iconDir glyphicon glyphicon-menu-right visible-xs-block"></span>
  28.                             </button>
  29.                             {{ render(controller('App\\Controller\\RechercheController::destinations')) }}
  30.                         </div>
  31.                         
  32.                         {{ render(controller('App\\Controller\\DefaultController::themes')) }}
  33.                         {% if haspromo is defined and haspromo %}
  34.                                 <div class="btn-group btn-group-block" role="group" >
  35.                                 <button class="sub-menu-btn btn-group-ateya" type="button" data-menu="menu-promos" data-level="1">{{ 'menu.a_saisir' |trans({},'app') |raw }}
  36.                                     <span class="caret hidden-xs"></span>
  37.                                     <span class="iconDir glyphicon glyphicon-menu-right visible-xs-block"></span>
  38.                                 </button>
  39.                                 <ul id="menu-promos" class="sub-menu sub-menu-1 menu-principal" >
  40.                                     <li class="col-md-12 col-sm-12 col-xs-12 mega-menu">
  41.                                         {% include "/front/Moteur/promos.html.twig" %}
  42.                                     </li>
  43.                                 </ul>
  44.                             </div>
  45.                         {% endif %}
  46.                     </li>
  47.                     <li class="hidden-md hidden-sm  mt-3">
  48.                         <div class="col-xs-6 mb-3">
  49.                         {% if app.user %}
  50.                             {% set compte = app.session.get("compte") %}
  51.                             <a href="{{ path('mon_compte') }}" class="compte" title="{{ 'menu.compte' |trans({},'app') |raw }}"><span class="glyphicon glyphicon-user"></span>  {{ app.user.prenom }} {{ app.user.nom |slice(0, 1)}}</a>
  52.                             <a class="logout " href="{{ path('_logout') }}" title="{{ 'menu.se_deconnecter' |trans({},'app') |raw }}"> </a>&nbsp;
  53.                         {% else %}
  54.                             <a  href="{{ path('compte') }}" class="compte" title="{{ 'menu.compte' |trans({},'app') |raw }}">
  55.                                 <span class="glyphicon glyphicon-user"></span>  {{ 'menu.compte' |trans({},'app') |raw }}
  56.                             </a>
  57.                         {% endif %}
  58.                         </div>
  59.                         <div class="col-xs-6 mb-3">
  60.                             <div id="trad_menu_mobile" class="ml-5 compte-mobile">
  61.                                 <a class="nav-link dropdown-toggle" href="#"  role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  62.                                     {{ locale_name[app.request.locale] }}<span class="caret"></span>
  63.                                 </a>
  64.                                 <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdown-language">
  65.                                     {% if app.request.locale != 'en' and route_name is not null  %}
  66.                                     <a class="dropdown-item" href="{{ path(route_name, params|merge({ _locale: 'en' })) }}">{{ locale_name['en'] }}</a>
  67.                                     {% endif %}
  68.                                     {% if app.request.locale != 'fr' and route_name is not null  %}
  69.                                     <a class="dropdown-item" href="{{ path(route_name, params|merge({ _locale: 'fr' })) }}">{{ locale_name['fr'] }}</a>
  70.                                     {% endif %}
  71.                                 </div>
  72.                             </div>
  73.                         </div>
  74.                     </li>
  75.                 </ul>
  76.             </nav>
  77.         </div>
  78.         <div class="col-md-3 col-sm-3 col-xs-12 menu-general">
  79.             <!-- BEGIN COMPTE ET LANGUE DESKTOP-->
  80.             <div class="hidden-xs pull-right ">
  81.                
  82.                 {% if is_granted('ROLE_CUSTOMER') %}
  83.                     <a class="compte" href="{{ path('mon_compte') }}" title="{{ 'menu.compte' |trans({},'app') |raw }}"><span class="glyphicon glyphicon-user"></span> {{ app.user.prenom }} {{ app.user.nom |slice(0, 1)}}</a>
  84.                     <a class="logout" href="{{ path('_logout') }}" title="{{ 'menu.se_deconnecter' |trans({},'app') |raw }}"><span class="glyphicon glyphicon-log-out"></span></a>&nbsp;
  85.                     
  86.                 {% elseif is_granted('ROLE_ADMIN')  or is_granted('ROLE_SUPER_ADMIN') %}
  87.                     <a class="compte" href="{{ path('ac_admin_homepage') }}" title="{{ 'menu.compte' |trans({},'app') |raw }}"><span class="glyphicon glyphicon-user"></span> {{ app.user.prenom }} {{ app.user.nom |slice(0, 1)}} [ADMIN]</a>
  88.                     <a class="logout" href="{{ path('_logout') }}" title="{{ 'menu.se_deconnecter' |trans({},'app') |raw }}"><span class="glyphicon glyphicon-log-out"></span></a>&nbsp;
  89.                 {% else %}
  90.                     <a class="compte" href="{{ path('compte') }}" title="{{ 'menu.se_connecter' |trans({},'app') |raw }}"><span class="glyphicon glyphicon-user"></span> {{ 'menu.se_connecter' |trans({},'app') |raw }}</a>
  91.                 {% endif %}
  92.                 <div id="trad_menu_desktop" class="ml-5 pr-3 pull-right">
  93.                     <a class="dropdown-toggle" href="#"  role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  94.                         {{ locale_name[app.request.locale] }}<span class="caret"></span>
  95.                     </a>
  96.                     <div class="dropdown-menu dropdown-menu-right mr-3" aria-labelledby="dropdown-language">
  97.                         {% if app.request.locale != 'en' and route_name is not null %}
  98.                         <a class="dropdown-item" href="{{ path(route_name, params|merge({ _locale: 'en' })) }}">{{ locale_name['en'] }}</a>
  99.                         {% endif %}
  100.                         {% if app.request.locale != 'fr'  and route_name is not null %}
  101.                         <a class="dropdown-item" href="{{ path(route_name, params|merge({ _locale: 'fr' })) }}">{{ locale_name['fr'] }}</a>
  102.                         {% endif %}
  103.                     </div>
  104.                 </div>
  105.             </div>
  106.             <!-- END COMPTE ET LANGUE DESKTOP-->
  107.         </div>
  108.     </div>
  109. </div>