{# HeaderMenuTemplate #}
{% set route = app.request.attributes.get('_route') %}
<div class="col-sm-3 col-md-2 sidebar">
{% if is_granted("ROLE_ADMIN") or is_granted("ROLE_USER") %}
<ul class="nav nav-sidebar">
<li>
<a href="{{ path('app_homepage')}}">
<span class="glyphicon glyphicon-dashboard"></span>
{% trans%}Tableau de bord{% endtrans%}
</a>
</li>
{# GESTION DES RESEAUX #}
{% if app.user.getLecture('RES') %}
{% set routeReseau = ["reseau", "reseau_new", "reseau_edit", "reseau_delete", "reseau_show", "reseau_produit_ordre"] %}
<li {% if route in routeReseau %}class="active"{% endif %}>
<a href="{{ path('reseau') }}">
<span class="glyphicon glyphicon-globe" aria-hidden="true"></span>
{% trans%}Réseaux{% endtrans%}
</a>
</li>
{% endif %}
{# GESTION DES PRODUITS #}
{% if app.user.getLecture('PDT') %}
{% set routeProduit = ["produit", "produit_new", "produit_edit", "produit_delete", "produit_show"] %}
<li {% if route in routeProduit %}class="active"{% endif %}>
<a href="{{ path('produit') }}">
<span class="fa fa-cubes"></span>
{% trans%}Produits{% endtrans%}
</a>
</li>
{% endif %}
{# GESTION DES ARTICLES #}
{% if app.user.getLecture('ART') %}
{% set routeArticle = ["article", "article_new", "article_edit", "article_delete", "article_show"] %}
<li {% if route in routeArticle %}class="active"{% endif %}>
<a href="{{ path('article') }}">
<span class="glyphicon glyphicon-file"></span>
{% trans%}Articles{% endtrans%}
</a>
</li>
{% endif %}
{# Etat des stocks #}
{% if app.user.getLecture('ART') %}
{% set routeArt = ["article_etat_stock"] %}
<li {% if route in routeArt %}class="active"{% endif %}>
<a href="{{ path('article_etat_stock') }}">
<span class="glyphicon glyphicon-transfer"></span>
Etat des stocks
</a>
</li>
{% endif %}
{# GESTION DES DOTATIONS #}
{% if app.user.getLecture('DOT') %}
{% set routeArticle = ["dotation", "dotation_new", "dotation_edit", "dotation_delete", "dotation_show"] %}
<li {% if route in routeArticle %}class="active"{% endif %}>
<a href="{{ path('dotation') }}">
<span class="fa fa-folder-open-o"></span>
{% trans%}Dotations{% endtrans%}
</a>
</li>
{% endif %}
{# GESTION DES COMMANDES #}
{% if app.user.getLecture('CDE') %}
{% set routeMessage = ["commande", "commande_new", "commande_edit", "commande_delete", "commande_show"] %}
<li {% if route in routeMessage %}class="active"{% endif %}>
<a href="{{ path('commande') }}">
<span class="glyphicon glyphicon-shopping-cart"></span>
{% trans%}Commandes{% endtrans%}
</a>
</li>
{% endif %}
{# GESTION DES MESSAGES #}
{% if app.user.getLecture('MSG') %}
{% set routeMessage = ["message", "message_new", "message_edit", "message_delete", "message_show"] %}
<li {% if route in routeMessage %}class="active"{% endif %}>
<a href="{{ path('message') }}">
<span class="fa fa-envelope"></span>
{% trans%}Messages{% endtrans%}
</a>
</li>
{% endif %}
{# GESTION DES LISTES POSITIVES #}
{% if app.user.getLecture('LPO') %}
{% set routeLP = ["listepositive", "listepositive_new", "listepositive_edit", "listepositive_show"] %}
<li {% if route in routeLP %}class="active"{% endif %}>
<a href="{{ path('listepositive') }}">
<span class="fa fa-list-alt"></span>
{% trans%}Listes positives{% endtrans%}
</a>
</li>
{% endif %}
{# GESTION DES STATISTIQUES #}
{# {% if app.user.getLecture('STA') %}#}
{% set routeStats = ["statistique"] %}
<li {% if route in routeStats %}class="active"{% endif %}>
<a href="{{ path('statistique') }}">
<i class="fa fa-area-chart" aria-hidden="true"></i>
{% trans%}app.statistique.textMenu{% endtrans%}
</a>
</li>
{# {% endif %}#}
{# GESTION DES REMISES/RESTITUTIONS #}
{% if app.user.getLecture('FEU') %}
{% set routeFeuille = ["feuille", "feuille_new", "feuille_edit", "feuille_delete", "feuille_show"] %}
<li {% if route in routeFeuille %}class="active"{% endif %}>
<a href="{{ path('feuille') }}">
<span class="glyphicon glyphicon-file"></span>
{% trans%}app.feuille.textMenu{% endtrans%}
</a>
</li>
{% endif %}
</ul>
<ul class="nav nav-sidebar">
{# GESTION DES CATEGORIE DE REAPPRO #}
{% if app.user.getLecture('CRE') %}
{% set routeReappro = ["catreappro", "catreappro_new", "catreappro_edit", "catreappro_delete", "catreappro_show"] %}
<li {% if route in routeReappro %}class="active"{% endif %}>
<a href="{{ path('catreappro') }}">
<span class="glyphicon glyphicon-th"></span>
{% trans%}Catégories Réappro{% endtrans%}
</a>
</li>
{% endif %}
{# GESTION DES CATEGORIE DE LISTE POSITIVE #}
{% if app.user.getLecture('TLP') %}
{% set routeCatLP = ["catlistepositive", "catlistepositive_new", "catlistepositive_edit", "catlistepositive_delete", "catlistepositive_show"] %}
<li {% if route in routeCatLP %}class="active"{% endif %}>
<a href="{{ path('catlistepositive') }}">
<span class="glyphicon glyphicon-th"></span>
{% trans%}Catégories Listes positives{% endtrans%}
</a>
</li>
{% endif %}
{# GESTION DES Types de socks #}
{% if app.user.getLecture('TST') %}
{% set routeTypeSt = ["typestock", "typestock_new", "typestock_edit", "typestock_delete", "typestock_show"] %}
<li {% if route in routeTypeSt %}class="active"{% endif %}>
<a href="{{ path('typestock') }}">
<span class="glyphicon glyphicon-th"></span>
{% trans%}TypeStock{% endtrans%}
</a>
</li>
{% endif %}
{# GESTION DES MVT de stock #}
{#
{% if app.user.getLecture('STK') %}
{% set routeSTK = ["stockmvt_inventaire"] %}
<li {% if route in routeSTK %}class="active"{% endif %}>
<a href="{{ path('stockmvt_inventaire') }}">
<span class="glyphicon glyphicon-transfer"></span>
{% trans%}StockMvtInventaire{% endtrans%}
</a>
</li>
{% endif %}
#}
{# GESTION DES MVT de stock #}
{#
{% if app.user.getLecture('STK') %}
{% set routeSTK = ["stockmvt_mouvement"] %}
<li {% if route in routeSTK %}class="active"{% endif %}>
<a href="{{ path('stockmvt_mouvement') }}">
<span class="glyphicon glyphicon-transfer"></span>
Mouvement de stock
</a>
</li>
{% endif %}
#}
{# GESTION DES alertes #}
{% if app.user.getLecture('PRO') %}
{% set routeAlerte = ["alerte", "alerte_edit", "alerte_delete", "alerte_show"] %}
<li {% if route in routeAlerte %}class="active"{% endif %}>
<a href="{{ path('alerte') }}">
<span class="fa fa-exclamation-triangle"></span>
{% trans%}Alertes{% endtrans%}
</a>
</li>
{% endif %}
</ul>
{#
<ul class="nav nav-sidebar">
<li><a href="">Nav item</a></li>
<li><a href="">Nav item again</a></li>
<li><a href="">One more nav</a></li>
<li><a href="">Another nav item</a></li>
<li><a href="">More navigation</a></li>
</ul>
#}
<ul class="nav nav-sidebar">
{# GESTION DES UTILISATEURS #}
{% if app.user.getLecture('USR') %}
{% set routeUser = ["user", "user_new", "user_edit", "user_delete", "reinitialisationPassword"] %}
<li {% if route in routeUser %}class="active"{% endif %}>
<a href="{{ path('user') }}">
<span class="fa fa-user"></span>
{% trans%}Utilisateurs{% endtrans%}
</a>
</li>
{% endif %}
{% if app.user.getLecture('PRO') %}
{% set routeProfil = ["profil", "profil_droits","profil_edit", "profil_alerte", "profil_droits"] %}
<li {% if route in routeProfil %}class="active"{% endif %}>
<a href="{{ path('profil') }}">
<span class="fa fa-users"></span>
{% trans%}Profils{% endtrans%}
</a>
</li>
{% endif %}
{% if app.user.getLecture('USR') %}
{% set routeUser = ['adresse_list', 'adresse_edit', 'adresse_show', 'adresse_new'] %}
<li {% if route in routeUser %}class="active"{% endif %}>
<a href="{{ path('adresse_list') }}">
<span class="glyphicon glyphicon-road"></span>
{% trans%}Adresse{% endtrans%}
</a>
</li>
{% endif %}
{% if app.user.getLecture('PRO') %}
{% set routeUser = ['regions', 'region_edit', 'region_show', 'region_new'] %}
<li {% if route in routeUser %}class="active"{% endif %}>
<a href="{{ path('region') }}">
<i class="fa fa-globe" aria-hidden="true"></i>
{% trans%}Régions{% endtrans%}
</a>
</li>
{% endif %}
{% if app.user.getLecture('PRO') %}
{% set routeUser = ['secteurs', 'secteur_edit', 'secteur_show', 'secteur_new'] %}
<li {% if route in routeUser %}class="active"{% endif %}>
<a href="{{ path('secteur') }}">
<i class="fa fa-briefcase" aria-hidden="true"></i>
{% trans%}Secteurs{% endtrans%}
</a>
</li>
{% endif %}
{% if app.user.getLecture('MAI') %}
{% set routeMail = ["app_mail_index", "app_mail_show"] %}
<li {% if route in routeMail %}class="active"{% endif %}>
<a href="{{ path('app_mail_index') }}">
<span class="fa fa-envelope"></span>
{% trans%}E-mail{% endtrans%}
</a>
</li>
{% endif %}
{% if app.user.getLecture('USR') %}
<li>
<a href="{{ path('parametre') }}">
<span class="fa fa-cog"></span>
{% trans%}Parametres{% endtrans%}
</a>
</li>
{% endif %}
</ul>
{# GESTION DES LOGS #}
<ul class="nav nav-sidebar">
{% if app.user.getLecture('ICE') %}
<li>
<a href="{{ path('app_commandeenvoi_index') }}">
<span class="glyphicon glyphicon-align-justify"></span>
{{ 'app.commandeenvoie.menu'|trans }}
</a>
</li>
{% endif %}
{% if app.user.getLecture('ICM') %}
<li>
<a href="{{ path('app_commanderetour_index') }}">
<span class="glyphicon glyphicon-align-justify"></span>
{{ 'app.commanderetour.menu'|trans }}
</a>
</li>
{% endif %}
{% if app.user.getLecture('IST') %}
<li>
<a href="{{ path('app_stockretour_index') }}">
<span class="glyphicon glyphicon-align-justify"></span>
{{ 'app.stockretour.menu'|trans }}
</a>
</li>
{% endif %}
{% if app.user.getLecture('IST') %}
<li>
<a href="{{ path('commande_suivi') }}">
<span class="glyphicon glyphicon-align-justify"></span>
{{ 'app.commandesuivi.menu'|trans }}
</a>
</li>
{% endif %}
</ul>
{% if app.user.profil and app.user.profil.accesFO %}
<ul class="nav nav-sidebar">
<li>
<a href="{{ path('frontoffice') }}">
<span class="glyphicon glyphicon-log-in"></span>
{% trans%}FrontOffice{% endtrans%}
</a>
</li>
</ul>
{% endif %}
{% endif %}<br /><br />
<p style="text-align:center;font-size: 0.75em;">
<a href="{{ path('condition_page') }}" style="color:#888;">
Conditions de protection des données personnelles
</a>
</p>
<img src="{{ asset('images/logo.png') }}" style="width:100%;" >
</div>