templates/include/menu.html.twig line 1

Open in your IDE?
  1. {% set help = '/files/help/help_demandeur.pdf' %}
  2. {% block stylesheets %}
  3.     <link rel="stylesheet" href="{{ asset('/css/custom/style-menu.css') }}">
  4.     <link rel="stylesheet" href="{{ asset('/css/custom/switch-language.css') }}">
  5.       <link rel="stylesheet" href="{{ asset('/css/menu.css') }}">
  6.  
  7. {% endblock %}
  8. {% if app.user %}
  9.     <div class="container-fluid fixed-top px-0 wow fadeIn bg-white" data-wow-delay="0.1s" id="menu-log-in">
  10.         <nav class="navbar navbar-expand-lg fixed-top navbar-light py-lg-0 px-lg-5 wow fadeIn bg-white" data-wow-delay="0.1s" id="nav" >
  11.             <div class="logo">
  12.                 <a href="{{ path('front') }}" class="navbar-brand ms-4 ms-lg-0">
  13.                     <img src="{{ asset('css/front/img/igppfinallogo/logo-fr.png') }}">
  14.                 </a>
  15.             </div>
  16.             <div class="mobile-menu-nav">
  17.                 <li class="nav-item dropdown">
  18.                     <a href="#" class="dropdown-toggle dropbtn display-mobile" id="notif" style="padding: 10px 15px;" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa-solid fa-bell"></i></a>
  19.                     {{ render( url('app_notification_list') ) }}
  20.                 </li> 
  21.                              {# <li class="nav-item dropdown">
  22.                                 <a href="#" class="nav-link dropdown-toggle dropbtn display-desktop notification-ring" id="notif" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa-solid fa-bell" style="font-size: 25px;"></i></a>
  23.                                 {{ render( url('app_notification_list') ) }}
  24.                             </li> #}
  25.                 {% if 'ROLE_SUPER_ADMIN' in app.user.getRoles() %}
  26.                     {% set help = '/files/help/help_super-admin.pdf'  %}
  27.                 {% elseif 'ROLE_ADMIN' in app.user.getRoles() %}
  28.                     {% set help = '/files/help/help_admin.pdf'  %}
  29.                 {% elseif 'ROLE_RD' in app.user.getRoles() %}
  30.                     {% set help = '/files/help/help_responsable.pdf'  %}
  31.                 {% endif %}
  32.                              <a href="{{ asset( help ) }}" target="_blank" id="help">
  33.                                 <i class="fa-solid fa-circle-info font-icon" ></i>
  34.                             </a>
  35.                              <div class="content-language-switch mobile">
  36.                                 <div class="switch" id="switch">
  37.                                     <input id="language-toggle" class="check-toggle check-toggle-round-flat" type="checkbox"
  38.                                            data-ar="{{ path('app_change_locale',{'_locale' : 'ar_TN'}) }}"
  39.                                            data-fr="{{ path('app_change_locale',{'_locale' : 'fr'}) }}"
  40.                                             {{ app.session.get('_locale') == 'ar_TN' ? 'checked="checked"' : ''  }}>
  41.                                     <label for="language-toggle"></label>
  42.                                     <span class="fr">FR</span>
  43.                                     <span class="ar">AR</span>
  44.                                 </div>
  45.                             </div>
  46.  
  47.                              <div class="d-flex user-profile">
  48.                            
  49.                                 <li class="nav-item dropdown user icon-name ">
  50.                                      {% if app.user.getPhoto() %}
  51.                                     <a class="img-profil marg_link dropdown-toggle dropbtn img" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"><img src="{{ asset('PhotoUsers/' ~ app.user.getPhoto()) }}" alt=""></a>
  52.                                         
  53.                                     {% else %}
  54.                                     <a class="img-profil marg_link dropdown-toggle dropbtn img" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> <img src="{{ asset('images/default.png') }}" alt=""></a>
  55.                                     {% endif %}
  56.                                 
  57.                                     {% if app.user.getPrenom() %}
  58.                                     
  59.                                         <a class="nav-link dropdown-toggle dropbtn user" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  60.                                             {{ app.user.getPrenom() }}
  61.                                             {{ app.user.getNom() }}
  62.                                         </a>
  63.                                         {# <button class="dropbtn">
  64.                                                 {{ app.user.getPrenom() }}
  65.                                                 {{ app.user.getNom() }}
  66.                                             </button> #}
  67.                                     {% else %}
  68.                                         <a class="nav-link dropdown-toggle dropbtn user" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  69.                                             {{ app.user.getEmail() }}
  70.                                         </a>
  71.                                         {# <button class="dropbtn">{{ app.user.getEmail() }}</button> #}
  72.                                     {% endif %}
  73.                                     <ul class="dropdown-menu" aria-labelledby="navbarDropdown" id="dropdownUser">
  74.                                         <li>
  75.                                             <a class="dropdown-item" href="#">
  76.                                                 {{ app.user.getPrenom() }}
  77.                                                 {{ app.user.getNom() }}
  78.                                             </a>
  79.                                         </li>
  80.                                         <li><hr class="dropdown-divider"></li>
  81.                                         <li><a class="dropdown-item" href="{{ path('app_profil') }}"><i class="fa-solid fa-user"></i> {% trans %} profil {% endtrans %}</a></li>
  82.                                         <li><hr class="dropdown-divider"></li>
  83.                                         <li><a class="dropdown-item" href="{{ path('app_logout') }}"><i class="fa-solid fa-arrow-right-from-bracket"></i> {% trans %} se_deconnecter {% endtrans %}</a></li>
  84.                                     </ul>
  85.                                     {# <div class="dropdown-content">
  86.                                             <a href="{{ path('app_profil') }}">Modifier profil</a>
  87.                                             <a href="{{ path('app_logout') }}">Se déconnecter</a>
  88.                                         </div> #}
  89.                                 </li>
  90.                          </div> 
  91.                         
  92.                 <button type="button" class="navbar-toggler me-4" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
  93.                     <span class="navbar-toggler-icon"></span>
  94.                 </button>
  95.             </div>
  96.             <div class="collapse navbar-collapse" id="navbarCollapse">
  97.                 <div class="navbar-nav ms-auto col-md-12">
  98.                     <div class="row userdetails align-items-center">
  99.                         <div class="menu-top">
  100.                             <div class="navbar-collapse" id="navbarSupportedContent">
  101.                                 <ul class="navbar-nav me-auto mb-2 mb-lg-0 align-items-center justify-content-center" id="">
  102.                                     <li class="nav-item">
  103.                                         <a href="{{ path('front') }}" class="nav-link active"><i class="fa-solid fa-house-chimney"></i></a>
  104.                                     </li>
  105.                                         {% if 'ROLE_ADMIN' not in app.user.getRoles() and 'ROLE_RD' not in app.user.getRoles()  %}
  106.                                             <li class="nav-item">
  107.                                                 <a href="{{ ( app.user.getCompleted() ) ? path('app_demande_index') : 'javascript:void(0);' }}" class="{{ ( app.user.getCompleted() ) ? 'm-f nav-link' : 'disabled' }}" style="color: #0000008c">{% trans %} mes_demande {% endtrans %}</a>
  108.                                             </li>
  109.                                             <li class="nav-item dropdown">
  110.                                                 <a href="{{ ( app.user.getCompleted() ) ? path( 'app_reclamation_list', { 'type' : 'all', 'id' : 0 } ) : 'javascript:void(0);' }}" class="{{ ( app.user.getCompleted() ) ? 'm-f nav-link' : 'disabled'}}" style="color: #0000008c">{% trans %} mes_reclamation {% endtrans %}</a>
  111.                                             </li>
  112.                                             <li class="nav-item dropdown">
  113.                                                 <a href="{{ ( app.user.getCompleted() ) ? path('app_meeting') : 'javascript:void(0);' }}" class=" {{ (  app.user.getCompleted() ) ? 'm-f nav-link' : 'disabled' }}" style="color: #0000008c">{% trans %} mes_reunion {% endtrans %}</a>
  114.                                             </li>
  115.                                         {% else %}
  116.                                             <li class="nav-item dropdown">
  117.                                                 <a href="{{ ( app.user.getCompleted() ) ? path('admin_dashboard') : 'javascript:void(0);' }}" class="{{ ( app.user.getCompleted()) ? 'm-f nav-link' : 'disabled' }}" style="color: #0000008c">{% trans %} mon_espace {% endtrans %}</a>
  118.                                             </li>
  119.                                         {% endif %}
  120.                                               <div class="content-language-switch tablt-mobile ">
  121.                                 <div class="switch" id="switch">
  122.                                     <input id="language-toggle" class="check-toggle check-toggle-round-flat" type="checkbox"
  123.                                            data-ar="{{ path('app_change_locale',{'_locale' : 'ar_TN'}) }}"
  124.                                            data-fr="{{ path('app_change_locale',{'_locale' : 'fr'}) }}"
  125.                                             {{ app.session.get('_locale') == 'ar_TN' ? 'checked="checked"' : ''  }}>
  126.                                     <label for="language-toggle"></label>
  127.                                     <span class="fr">FR</span>
  128.                                     <span class="ar">AR</span>
  129.                                 </div>
  130.                             </div>
  131.                                 </ul>
  132.                             </div>
  133.                         </div>    
  134.                         
  135.                     </div>
  136.                 </div>
  137.             </div>
  138.         </nav>
  139.     </div>
  140. {% else %}
  141.     <div class="container-fluid fixed-top px-0 wow fadeIn" data-wow-delay="0.1s" id="menu-log-out">
  142.         <nav class="navbar navbar-expand-lg navbar-light py-lg-0 px-lg-5 wow fadeIn" data-wow-delay="0.1s">
  143.             <div class="logo">
  144.                 <a href="{{ path('front') }}" class="navbar-brand ms-4 ms-lg-0">
  145.                     <img src="{{ asset('css/front/img/igppfinallogo/logo-fr.png') }}">
  146.                 </a>
  147.             </div>
  148.               <span id="notif-lang-mobile">
  149.                  <a href="{{ asset( help ) }}" class="item_menu_center" target="_blank" id="help">   <i class="fa-solid fa-circle-info font-icon customNavs cnx desctop" ></i>   </a>
  150.                     <div class="content-language-switch item_menu_center cnx desctop " id="lang-switch">
  151.                         <div class="switch">
  152.                             <input id="language-toggle" class="check-toggle check-toggle-round-flat" type="checkbox"
  153.                                    data-ar="{{ path('app_change_locale',{'_locale' : 'ar_TN'}) }}"
  154.                                    data-fr="{{ path('app_change_locale',{'_locale' : 'fr'}) }}"
  155.                                     {{ app.session.get('_locale') == 'ar_TN' ? 'checked="checked"' : ''  }}>
  156.                             <label for="language-toggle"></label>
  157.                             <span class="fr">FR</span>
  158.                             <span class="ar">AR</span>
  159.                         </div>
  160.                      </div>
  161.               </span>
  162.             <button type="button" class="navbar-toggler me-4" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
  163.                 <span class="navbar-toggler-icon" style="margin-top :5px" ></span>
  164.             </button>
  165.            
  166.             <div class="collapse navbar-collapse" id="navbarCollapse">
  167.                 <div class="navbar-nav ms-auto col-md-12">
  168.                     <div class="style-menu ms-auto p-4 p-lg-0 "
  169.                     >
  170.                         <a href="{{ path('login') }}" class="nav-item nav-link main-btn">{% trans %} se_connecter {% endtrans %}</a>
  171.                         <a href="{{ path('app_register') }}" class="ml-5 nav-item nav-link second-btn">{% trans %} inscrire {% endtrans %}</a>
  172.                         
  173.                         <a href="{{ asset('/files/help/help_demandeur.pdf') }}" class="item_menu_center" target="_blank" id="help">   <i class="fa-solid fa-circle-info font-icon customNavs cnx  mobile" ></i>   </a>
  174.                      <div class="content-language-switch item_menu_center  cnx mobile" id="lang-switch">
  175.                         <div class="switch">
  176.                             <input id="language-toggle" class="check-toggle check-toggle-round-flat" type="checkbox"
  177.                                    data-ar="{{ path('app_change_locale',{'_locale' : 'ar_TN'}) }}"
  178.                                    data-fr="{{ path('app_change_locale',{'_locale' : 'fr'}) }}"
  179.                                     {{ app.session.get('_locale') == 'ar_TN' ? 'checked="checked"' : ''  }}>
  180.                             <label for="language-toggle"></label>
  181.                             <span class="fr">FR</span>
  182.                             <span class="ar">AR</span>
  183.                         </div>
  184.                      </div>
  185.                     </div>
  186.                   </div> 
  187.                 </div>
  188.  
  189.             </div>
  190.         </nav>
  191.     </div>
  192. {% endif %}