templates/leftmenu.html.twig line 21

Open in your IDE?
  1. {% set show_vue = false  %}
  2. {% if is_granted('ROLE_vue_graphique') or is_granted('ROLE_vue_details') or is_granted('ROLE_admin') %}
  3.     {% set show_vue = true  %}
  4. {% endif %}
  5. <div class="sidebar active" data-color="purple" data-image="{{ asset('assets/img/sidebar-5.jpg') }}">
  6.     <div class="sidebar-wrapper">
  7.         <div class="btn-close">
  8.             <button type="button" class="close" aria-label="Close">
  9.                 <span aria-hidden="true">&times;</span>
  10.             </button>
  11.         </div>
  12.         
  13.         <div class="logo">
  14.         
  15.             <a href="{{ path('home') }}" class="simple-text">
  16.                 <img src="{{ asset('assets/img/teaminfo_white.png') }}" style="max-width: 100%;">
  17.             </a>
  18.             <a href="{{ path('mon_profil') }}" class="simple-text full_name_size">
  19.                 {{ app.user.prenom }} {{ app.user.nom }}
  20.             </a>
  21.         </div>
  22.         <ul class="nav">
  23.         
  24.             <li {% if titre_page == "Tableau de bord" %}class="active"{% endif %}>
  25.                 <a href="{{ path('home') }}">
  26.                     <i class="pe-7s-graph"></i>
  27.                     <p>{%trans%}Tableau de bord{%endtrans%}</p>
  28.                 </a>
  29.             </li>
  30.             
  31.             {% if is_granted('ROLE_SUPER_ADMIN') %}
  32.                 <li {% if titre_page == "Utilisateurs" %}class="active"{% endif %}>
  33.                     <a href="{{ path('users') }}">
  34.                         <i class="pe-7s-user"></i>
  35.                         <p>{%trans%}Utilisateurs{%endtrans%}</p>
  36.                     </a>
  37.                 </li>
  38.             {% endif %}
  39.             
  40.             {% if is_granted('ROLE_user_licences') %}
  41.                 <li {% if titre_page == "Licences" %}class="active"{% endif %}>
  42.                     <a href="{{ path('Licences_user') }}">
  43.                         <i class="pe-7s-key"></i>
  44.                         <p>{%trans%}Licences{%endtrans%}</p>
  45.                     </a>
  46.                 </li>
  47.             {% endif %}            
  48.             
  49.             {% if show_vue and is_granted('ROLE_user_tickets') %} 
  50.  
  51.                 <li {% if titre_page == "Ticket" %}class="active"{% endif %}>
  52.                     <a href="{{ServiceTeaminfo.getPageLink(path('Ticket_reseaux_liste'), path('Ticket_reseaux'), 'ticket_reseau')}}">
  53.                         <i class="pe-7s-ticket"></i>
  54.                         <p>{%trans%}Tickets{%endtrans%}</p>
  55.                     </a>
  56.                 </li>
  57.             {% endif %}
  58.             
  59.             {% if show_vue and is_granted('ROLE_user_interventions') %}
  60.  
  61.                 
  62.                 <li {% if titre_page == "Interventions" %}class="active"{% endif %}>
  63.                     <a href="{{ServiceTeaminfo.getPageLink(path('Interventions_user'), path('Interventions_vue_graphique'), 'Interventions')}}">
  64.                         <i class="pe-7s-date"></i>
  65.                         <p>{%trans%}Interventions{%endtrans%}</p>
  66.                     </a>
  67.                 </li>
  68.             {% endif %}
  69.         
  70.             {% if is_granted('ROLE_user_atelier')%}
  71.                 <li   {% if titre_page == "Atelier" %}class="active"{% endif %}>
  72.                     <a href="{{ path('Atelier_user') }}">
  73.                         <i class="pe-7s-tools"></i>
  74.                         <p>{%trans%}Atelier{%endtrans%}</p>
  75.                     </a>
  76.                 </li>
  77.             {% endif %}
  78.  
  79.             {% if is_granted('ROLE_user_projects') or is_granted('ROLE_planificateur') or is_granted('ROLE_intervenant')or is_granted('ROLE_CLIENT') %}
  80.                 {% if show_vue %}
  81.                     <li {% if titre_page == "Projects" %}class="active"{% endif %}>
  82.                         <a href="{{ServiceTeaminfo.getPageLink(path('projects'), path('projects_vue_graphique'), 'projet')}}">                                
  83.                             <i class="pe-7s-albums"></i>
  84.                             <p>{%trans%}Projets{%endtrans%}</p>
  85.                         </a>
  86.                     </li>
  87.                 {% endif %}
  88.                 
  89.                 {% if titre_page in ["Paramétres du Projet","Journal","Suivi de facturation","Planification","Gestion des frais","Modifier Projet","Suivi Travaux","Documents Projet"]  %}
  90.                     <div class="liste_menu_project" >    
  91.                         <li {% if titre_page == "Modifier Projet" %}class="active"{% endif %}>
  92.                             <a href="{{path('project_modify', { 'id':app.request.get('id')})}}">
  93.                                 <p>{%trans%}Details{%endtrans%}</p>
  94.                             </a>
  95.                         </li>
  96.                         {% if 'ROLE_CLIENT' not in app.user.roles %}
  97.                             <li {% if titre_page == "Planification" %}class="active"{% endif %}>
  98.                                 <a href="{{path('project_planification', { 'id':app.request.get('id')})}}">
  99.                                     <p>{%trans%}Planification{%endtrans%}</p>
  100.                                 </a>
  101.                             </li>
  102.                         {%endif %}
  103.                         
  104.                         {% if 'ROLE_CLIENT' not in app.user.roles and 'ROLE_SUPER_ADMIN' not in app.user.roles and not(app.user.getClient()) and(is_granted('ROLE_planificateur') or is_granted('ROLE_admin'))%}
  105.                             {% if ServiceTeaminfo.IsJournalProjet() %}
  106.                                 <li {% if titre_page == "Journal" %}class="active"{% endif %}>
  107.                                     <a href="{{path('projects_journal',{'id':app.request.get('id')})}}">
  108.                                         <p>{%trans%}Journal{%endtrans%}</p>
  109.                                     </a>
  110.                                 </li>
  111.                             {% endif %}
  112.                             
  113.                             <li {% if titre_page == "Suivi Travaux" %}class="active"{% endif %}>
  114.                                 <a href="{{path('project_suivi_travaux', { 'id':app.request.get('id')})}}">
  115.                                     <p>{%trans%}Suivi de travaux{%endtrans%}</p>
  116.                                 </a>
  117.                             </li>
  118.                                 
  119.                             <li {% if titre_page == "Gestion des frais" %} class="active" {% endif %}>
  120.                                 <a href="{{path('projects_frais',{'id':app.request.get('id')})}}">
  121.                                     <p>{%trans%}Gestion des frais{%endtrans%}</p>
  122.                                 </a>
  123.                             </li>    
  124.                         {%endif%}
  125.          
  126.                         {% if not(app.user.getClient()) and(is_granted('ROLE_planificateur') or is_granted('ROLE_admin') or is_granted('ROLE_intervenant')  )  %}
  127.                             <li {% if titre_page == "Documents Chantier" %}class="active"{% endif %}>
  128.                                 <a href="{{path('project_document',{'id':app.request.get('id')})}}">
  129.                                     <p>{%trans%}Documents chantier{%endtrans%}</p>
  130.                                 </a>
  131.                             </li>
  132.                         {%endif%}
  133.                         {% if 'ROLE_CLIENT' not in app.user.roles and not(app.user.getClient()) and(is_granted('ROLE_planificateur') or is_granted('ROLE_admin')) %}
  134.                             <li {% if titre_page == "Suivi de facturation" %}class="active"{% endif %}>
  135.                                 <a href="{{path('projects_suivi_facturation',{'id':app.request.get('id')})}}">
  136.                                     <p>{%trans%} Suivi de facturation {%endtrans%}</p>
  137.                                 </a>
  138.                             </li>
  139.                                 
  140.                             <li {% if titre_page == "Paramétres du Projet" %}class="active"{% endif %}>
  141.                                 <a href="{{path('project_parametre', { 'id':app.request.get('id')})}}">
  142.                                     <p>{%trans%}Paramétres{%endtrans%}</p>
  143.                                 </a>
  144.                             </li>
  145.                         {% endif %}
  146.                     </div>
  147.                 {% endif %}
  148.             {% endif %}
  149.             
  150.             {% if is_granted('ROLE_user_materiels') %}
  151.                 <li {% if titre_page == "Materiels Projet" %}class="active"{% endif %}>
  152.                     <a href="{{ path('materiels_projet') }}">
  153.                         <i class="pe-7s-albums"></i>
  154.                         <p>{%trans%}Materiels{%endtrans%}</p>
  155.                     </a>
  156.                 </li>
  157.             {% endif %}
  158.             
  159.             {% if is_granted('ROLE_USER') and not(app.user.getClient()) %}
  160.                 <li {% if titre_page == "Congés" %}class="active"{% endif %}>
  161.                     <a href="{{ path('conge') }}">
  162.                         <i class="pe-7s-config"></i>
  163.                         <p>{%trans%}RH{%endtrans%}</p>
  164.                     </a>
  165.                 </li>
  166.             {% endif %}
  167.             {% if is_granted('ROLE_admin') %}
  168.                 <div class="admin_liste">
  169.                     <li class="">
  170.                         <a href="javascript:void(0);" >
  171.                             <p>{%trans%}Administration{%endtrans%} <span class="">+</span></p>
  172.                         </a>
  173.                     </li>
  174.                 </div>
  175.                 <div class="liste_menu_admin" >                        
  176.                     <li {% if titre_page == "Utilisateurs" and app.request.query.get('type') !="client"%}class="active"{% endif %}">
  177.                         <a href="{{ path('users') }}">
  178.                             <i class="pe-7s-user"></i>
  179.                             <p>{%trans%}Utilisateurs{%endtrans%}</p>
  180.                         </a>
  181.                     </li>
  182.                     
  183.                     <li {% if titre_page == "Equipes" %}class="active"{% endif %}>
  184.                         <a href="{{ path('equipe') }}">
  185.                             <i class="pe-7s-user"></i>
  186.                             <p>{%trans%}Equipes{%endtrans%}</p>
  187.                         </a>
  188.                     </li>
  189.                     
  190.                     <li {% if titre_page == "Clients" or (titre_page == "Utilisateurs" and app.request.query.get('type') =="client")%}class="active"{% endif %}>
  191.                         <a href="{{ path('clients') }}">
  192.                             <i class="pe-7s-id"></i>
  193.                             <p>{%trans%}Clients{%endtrans%}</p>
  194.                         </a>
  195.                     </li>
  196.                     
  197.                     <li {% if titre_page == "Admin Licences" %}class="active"{% endif %}>
  198.                         <a href="{{ path('licences') }}">
  199.                             <i class="pe-7s-config"></i>
  200.                             <p>{%trans%}Licences{%endtrans%}</p>
  201.                         </a>
  202.                     </li>
  203.                     
  204.                     <li {% if titre_page == "Admin Tickets" %}class="active"{% endif %}>
  205.                         <a href="{{path('origine_ticket_reseaux')}}">
  206.                             <i class="pe-7s-ticket"></i>
  207.                             <p>{%trans%}Tickets{%endtrans%}</p>
  208.                         </a>
  209.                     </li>
  210.                 
  211.                     <li {% if titre_page == "Admin Interventions" %}class="active"{% endif %}>
  212.                         <a href="{{ path('contrats') }}">
  213.                             <i class="pe-7s-config"></i>
  214.                             <p>{%trans%}Intervention{%endtrans%}</p>
  215.                         </a>
  216.                     </li>    
  217.                     
  218.                     <li {% if titre_page == "Admin Projects" %}class="active"{% endif %}>
  219.                         <a href="{{ path('fournisseurs') }}">
  220.                             <i class="pe-7s-config"></i>
  221.                             <p>{%trans%}Projets{%endtrans%}</p>
  222.                         </a>
  223.                     </li>
  224.                     
  225.                     <li {% if titre_page == "Admin Ateliers" %}class="active"{% endif %}>
  226.                         <a href="{{ path('marques') }}">
  227.                             <i class="pe-7s-config"></i>
  228.                             <p>{%trans%}Ateliers{%endtrans%}</p>
  229.                         </a>
  230.                     </li>    
  231.                     
  232.                     {% if is_granted('ROLE_ENTREPRISE') %}
  233.                         <li {% if titre_page == "Admin Entreprise" %}class="active"{% endif %}>
  234.                             <a href="{{ path('entreprise_modify') }}">
  235.                                 <i class="pe-7s-config"></i>
  236.                                 <p>{%trans%}Entreprise{%endtrans%}</p>
  237.                             </a>
  238.                         </li>    
  239.                     {% endif %}
  240.                 </div>
  241.             {% endif %}
  242.                                     
  243.             <li class="menu_logout">
  244.                 <a href="{{ path('logout') }}">
  245.                     <i class="pe-7s-lock"></i>
  246.                     <p>{%trans%}Déconnexion{%endtrans%}</p>
  247.                 </a>
  248.             </li>
  249.         </ul>
  250.         
  251.         {% if route_name != "connexion" %}<p class="version">V {{version_logiciel}}</p>{% endif %}            
  252.         
  253.         <button class="btn btn-link" id="btn_collapse_sidebar">
  254.             <i class="pe-7s-menu"></i>
  255.         </button>
  256.     </div>    
  257. </div>