HegreEtConfort/templates/base.html.twig

55 lines
2.1 KiB
Twig

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Mon App Symfony{% endblock %}</title>
{% block stylesheets %}{% endblock %}
</head>
<body>
{% if app.user %}
<div class="user-info">
Connecté en tant que {{ app.user.email }} |
Rôles :
{% for role in app.user.roles %}
{{ role }}{% if not loop.last %}, {% endif %}
{% endfor %}
</div>
<nav>
<ul>
{% if is_granted('ROLE_ADMIN') %}
<li><a href="{{ path('admin_dashboard') }}">Dashboard Admin</a></li>
<li><a href="{{ path('app_user_index') }}">Gérer un utilisateur</a></li>
<li><a href="{{ path('app_calendrier_index') }}">Tous les plannings</a></li>
<li><a href="{{ path('app_stock_index') }}">Gérer les stocks</a></li>
<li><a href="{{ path('app_vehicle_index') }}">Gérer les véhicules</a></li>
{% endif %}
{% if is_granted('ROLE_SECRETAIRE') %}
<li><a href="{{ path('secretaire_dashboard') }}">Dashboard Secrétaire</a></li>
<li><a href="{{ path('user_new') }}">Créer un chauffagiste</a></li>
<li><a href="{{ path('calendrier_index_secretaire') }}">Plannings chauffagistes</a></li>
<li><a href="{{ path('stock_index') }}">Gérer les stocks</a></li>
<li><a href="{{ path('vehicle_index') }}">Gérer les véhicules</a></li>
{% endif %}
{% if is_granted('ROLE_CHAUFFAGISTE') %}
<li><a href="{{ path('chauffagiste_dashboard') }}">Dashboard Chauffagiste</a></li>
<li><a href="{{ path('calendrier_index_chauffagiste') }}">Mon planning</a></li>
<li><a href="{{ path('intervention_index') }}">Mes interventions</a></li>
<li><a href="{{ path('stock_index') }}">Pièces détachées</a></li>
{% endif %}
<li><a href="{{ path('app_logout') }}">Déconnexion</a></li>
</ul>
</nav>
{% endif %}
<div class="content">
{% block body %}{% endblock %}
</div>
{% block javascripts %}{% endblock %}
</body>
</html>