{% set show_vue = false %}
{% if is_granted('ROLE_vue_graphique') or is_granted('ROLE_vue_details') or is_granted('ROLE_admin') %}
{% set show_vue = true %}
{% endif %}
<div class="sidebar active" data-color="purple" data-image="{{ asset('assets/img/sidebar-5.jpg') }}">
<div class="sidebar-wrapper">
<div class="btn-close">
<button type="button" class="close" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="logo">
<a href="{{ path('home') }}" class="simple-text">
<img src="{{ asset('assets/img/teaminfo_white.png') }}" style="max-width: 100%;">
</a>
<a href="{{ path('mon_profil') }}" class="simple-text full_name_size">
{{ app.user.prenom }} {{ app.user.nom }}
</a>
</div>
<ul class="nav">
<li {% if titre_page == "Tableau de bord" %}class="active"{% endif %}>
<a href="{{ path('home') }}">
<i class="pe-7s-graph"></i>
<p>{%trans%}Tableau de bord{%endtrans%}</p>
</a>
</li>
{% if is_granted('ROLE_SUPER_ADMIN') %}
<li {% if titre_page == "Utilisateurs" %}class="active"{% endif %}>
<a href="{{ path('users') }}">
<i class="pe-7s-user"></i>
<p>{%trans%}Utilisateurs{%endtrans%}</p>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_user_licences') %}
<li {% if titre_page == "Licences" %}class="active"{% endif %}>
<a href="{{ path('Licences_user') }}">
<i class="pe-7s-key"></i>
<p>{%trans%}Licences{%endtrans%}</p>
</a>
</li>
{% endif %}
{% if show_vue and is_granted('ROLE_user_tickets') %}
<li {% if titre_page == "Ticket" %}class="active"{% endif %}>
<a href="{{ServiceTeaminfo.getPageLink(path('Ticket_reseaux_liste'), path('Ticket_reseaux'), 'ticket_reseau')}}">
<i class="pe-7s-ticket"></i>
<p>{%trans%}Tickets{%endtrans%}</p>
</a>
</li>
{% endif %}
{% if show_vue and is_granted('ROLE_user_interventions') %}
<li {% if titre_page == "Interventions" %}class="active"{% endif %}>
<a href="{{ServiceTeaminfo.getPageLink(path('Interventions_user'), path('Interventions_vue_graphique'), 'Interventions')}}">
<i class="pe-7s-date"></i>
<p>{%trans%}Interventions{%endtrans%}</p>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_user_atelier')%}
<li {% if titre_page == "Atelier" %}class="active"{% endif %}>
<a href="{{ path('Atelier_user') }}">
<i class="pe-7s-tools"></i>
<p>{%trans%}Atelier{%endtrans%}</p>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_user_projects') or is_granted('ROLE_planificateur') or is_granted('ROLE_intervenant')or is_granted('ROLE_CLIENT') %}
{% if show_vue %}
<li {% if titre_page == "Projects" %}class="active"{% endif %}>
<a href="{{ServiceTeaminfo.getPageLink(path('projects'), path('projects_vue_graphique'), 'projet')}}">
<i class="pe-7s-albums"></i>
<p>{%trans%}Projets{%endtrans%}</p>
</a>
</li>
{% endif %}
{% if titre_page in ["Paramétres du Projet","Journal","Suivi de facturation","Planification","Gestion des frais","Modifier Projet","Suivi Travaux","Documents Projet"] %}
<div class="liste_menu_project" >
<li {% if titre_page == "Modifier Projet" %}class="active"{% endif %}>
<a href="{{path('project_modify', { 'id':app.request.get('id')})}}">
<p>{%trans%}Details{%endtrans%}</p>
</a>
</li>
{% if 'ROLE_CLIENT' not in app.user.roles %}
<li {% if titre_page == "Planification" %}class="active"{% endif %}>
<a href="{{path('project_planification', { 'id':app.request.get('id')})}}">
<p>{%trans%}Planification{%endtrans%}</p>
</a>
</li>
{%endif %}
{% 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'))%}
{% if ServiceTeaminfo.IsJournalProjet() %}
<li {% if titre_page == "Journal" %}class="active"{% endif %}>
<a href="{{path('projects_journal',{'id':app.request.get('id')})}}">
<p>{%trans%}Journal{%endtrans%}</p>
</a>
</li>
{% endif %}
<li {% if titre_page == "Suivi Travaux" %}class="active"{% endif %}>
<a href="{{path('project_suivi_travaux', { 'id':app.request.get('id')})}}">
<p>{%trans%}Suivi de travaux{%endtrans%}</p>
</a>
</li>
<li {% if titre_page == "Gestion des frais" %} class="active" {% endif %}>
<a href="{{path('projects_frais',{'id':app.request.get('id')})}}">
<p>{%trans%}Gestion des frais{%endtrans%}</p>
</a>
</li>
{%endif%}
{% if not(app.user.getClient()) and(is_granted('ROLE_planificateur') or is_granted('ROLE_admin') or is_granted('ROLE_intervenant') ) %}
<li {% if titre_page == "Documents Chantier" %}class="active"{% endif %}>
<a href="{{path('project_document',{'id':app.request.get('id')})}}">
<p>{%trans%}Documents chantier{%endtrans%}</p>
</a>
</li>
{%endif%}
{% if 'ROLE_CLIENT' not in app.user.roles and not(app.user.getClient()) and(is_granted('ROLE_planificateur') or is_granted('ROLE_admin')) %}
<li {% if titre_page == "Suivi de facturation" %}class="active"{% endif %}>
<a href="{{path('projects_suivi_facturation',{'id':app.request.get('id')})}}">
<p>{%trans%} Suivi de facturation {%endtrans%}</p>
</a>
</li>
<li {% if titre_page == "Paramétres du Projet" %}class="active"{% endif %}>
<a href="{{path('project_parametre', { 'id':app.request.get('id')})}}">
<p>{%trans%}Paramétres{%endtrans%}</p>
</a>
</li>
{% endif %}
</div>
{% endif %}
{% endif %}
{% if is_granted('ROLE_user_materiels') %}
<li {% if titre_page == "Materiels Projet" %}class="active"{% endif %}>
<a href="{{ path('materiels_projet') }}">
<i class="pe-7s-albums"></i>
<p>{%trans%}Materiels{%endtrans%}</p>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_USER') and not(app.user.getClient()) %}
<li {% if titre_page == "Congés" %}class="active"{% endif %}>
<a href="{{ path('conge') }}">
<i class="pe-7s-config"></i>
<p>{%trans%}RH{%endtrans%}</p>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_admin') %}
<div class="admin_liste">
<li class="">
<a href="javascript:void(0);" >
<p>{%trans%}Administration{%endtrans%} <span class="">+</span></p>
</a>
</li>
</div>
<div class="liste_menu_admin" >
<li {% if titre_page == "Utilisateurs" and app.request.query.get('type') !="client"%}class="active"{% endif %}">
<a href="{{ path('users') }}">
<i class="pe-7s-user"></i>
<p>{%trans%}Utilisateurs{%endtrans%}</p>
</a>
</li>
<li {% if titre_page == "Equipes" %}class="active"{% endif %}>
<a href="{{ path('equipe') }}">
<i class="pe-7s-user"></i>
<p>{%trans%}Equipes{%endtrans%}</p>
</a>
</li>
<li {% if titre_page == "Clients" or (titre_page == "Utilisateurs" and app.request.query.get('type') =="client")%}class="active"{% endif %}>
<a href="{{ path('clients') }}">
<i class="pe-7s-id"></i>
<p>{%trans%}Clients{%endtrans%}</p>
</a>
</li>
<li {% if titre_page == "Admin Licences" %}class="active"{% endif %}>
<a href="{{ path('licences') }}">
<i class="pe-7s-config"></i>
<p>{%trans%}Licences{%endtrans%}</p>
</a>
</li>
<li {% if titre_page == "Admin Tickets" %}class="active"{% endif %}>
<a href="{{path('origine_ticket_reseaux')}}">
<i class="pe-7s-ticket"></i>
<p>{%trans%}Tickets{%endtrans%}</p>
</a>
</li>
<li {% if titre_page == "Admin Interventions" %}class="active"{% endif %}>
<a href="{{ path('contrats') }}">
<i class="pe-7s-config"></i>
<p>{%trans%}Intervention{%endtrans%}</p>
</a>
</li>
<li {% if titre_page == "Admin Projects" %}class="active"{% endif %}>
<a href="{{ path('fournisseurs') }}">
<i class="pe-7s-config"></i>
<p>{%trans%}Projets{%endtrans%}</p>
</a>
</li>
<li {% if titre_page == "Admin Ateliers" %}class="active"{% endif %}>
<a href="{{ path('marques') }}">
<i class="pe-7s-config"></i>
<p>{%trans%}Ateliers{%endtrans%}</p>
</a>
</li>
{% if is_granted('ROLE_ENTREPRISE') %}
<li {% if titre_page == "Admin Entreprise" %}class="active"{% endif %}>
<a href="{{ path('entreprise_modify') }}">
<i class="pe-7s-config"></i>
<p>{%trans%}Entreprise{%endtrans%}</p>
</a>
</li>
{% endif %}
</div>
{% endif %}
<li class="menu_logout">
<a href="{{ path('logout') }}">
<i class="pe-7s-lock"></i>
<p>{%trans%}Déconnexion{%endtrans%}</p>
</a>
</li>
</ul>
{% if route_name != "connexion" %}<p class="version">V {{version_logiciel}}</p>{% endif %}
<button class="btn btn-link" id="btn_collapse_sidebar">
<i class="pe-7s-menu"></i>
</button>
</div>
</div>