2024-10-25 19:15:26 +02:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
2024-10-28 02:45:24 +01:00
|
|
|
{% block head %}
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
2024-11-21 14:51:11 +01:00
|
|
|
<title>{% block title %}Cuisine{% endblock %}</title>
|
2024-10-28 02:45:24 +01:00
|
|
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
|
|
|
|
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
|
|
|
|
</head>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block stylesheets %}
|
2024-11-21 16:21:37 +01:00
|
|
|
<link rel="stylesheet" href="{{ asset('css/index.css') }}"> <!-- Ajout du fichier CSS -->
|
2024-10-28 02:45:24 +01:00
|
|
|
{% endblock %}
|
2024-10-25 19:15:26 +02:00
|
|
|
|
|
|
|
{% block body %}
|
2024-11-07 19:01:46 +01:00
|
|
|
<style>
|
|
|
|
#container_gestion_user {
|
|
|
|
background-color: white;
|
|
|
|
margin-left: 20%; /* Centrage vertical */
|
|
|
|
margin-top: 5%;
|
|
|
|
padding: 20px;
|
|
|
|
border: 1px solid black;
|
|
|
|
width: 75%; /* Largeur du contenu de la modal */
|
|
|
|
height: 100%; /* Hauteur du contenu de la modal */
|
|
|
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
|
|
|
display: none;
|
|
|
|
}
|
2024-11-21 14:51:11 +01:00
|
|
|
|
|
|
|
a{
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
a:visited {
|
|
|
|
color: initial;
|
|
|
|
}
|
|
|
|
|
2024-11-07 19:01:46 +01:00
|
|
|
</style>
|
2024-10-28 02:45:24 +01:00
|
|
|
|
|
|
|
<!-- Top Bar -->
|
|
|
|
<div class="top-bar">
|
|
|
|
<div>
|
|
|
|
Bonjour, {{ app.user.prenom }}
|
|
|
|
</div>
|
|
|
|
<div class="user-role">
|
|
|
|
Rôle : {{ app.user.getRolesAsString() }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Left Menu -->
|
|
|
|
<div class="left-background">
|
|
|
|
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
|
|
|
|
|
|
|
|
<div class="nav-bar">
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<div class="btn-custom icon-container">
|
|
|
|
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
|
|
|
|
<span data-modal="userModal">Gérer Utilisateur</span>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="btn-custom icon-container">
|
|
|
|
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
|
|
|
|
<span data-modal="tableModal">Gérer Table</span>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="btn-custom icon-container">
|
|
|
|
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
|
|
|
|
<span>Gestion Menu</span>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="btn-custom icon-container">
|
|
|
|
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
|
|
|
|
<span>Gestion Promotion</span>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="btn-custom icon-container">
|
|
|
|
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
|
|
|
|
<span>Voir tendances</span>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="Information-perso">
|
|
|
|
<div class="btn-info-compte icon-container">
|
|
|
|
<i class="icon-medium"> {{ ux_icon('ph:user-circle-fill') }}</i>
|
2024-11-07 19:01:46 +01:00
|
|
|
<span>Compte</span>
|
2024-10-28 02:45:24 +01:00
|
|
|
</div>
|
|
|
|
<div class="btn-info-exit icon-container">
|
|
|
|
<a href="{{ path('app_logout') }}" class="icon-medium">
|
|
|
|
{{ ux_icon('iconamoon:exit-bold') }}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-11-07 19:01:46 +01:00
|
|
|
<div id="container_gestion_user">
|
|
|
|
<!-- Contenu par défaut, ou vous pouvez laisser vide -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
2024-11-21 16:21:37 +01:00
|
|
|
document.querySelector('.btn-info-Compte').addEventListener('click', function(event) {
|
2024-11-07 19:01:46 +01:00
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
const contentContainer = document.getElementById('container-gestion-user');
|
|
|
|
|
|
|
|
// Vérifie si le contenu est déjà affiché
|
|
|
|
if (container_gestion_user.style.display === 'block') {
|
|
|
|
// Masquer la section "Compte" si elle est déjà affichée
|
|
|
|
container_gestion_user.style.display = 'none';
|
|
|
|
container_gestion_user.innerHTML = ''; // On efface le contenu pour éviter la réutilisation
|
|
|
|
} else {
|
|
|
|
// Afficher le conteneur et charger le contenu via AJAX
|
|
|
|
fetch('/gestion-user')
|
|
|
|
.then(response => {
|
|
|
|
if (!response.ok) {
|
|
|
|
throw new Error('Erreur de chargement de la section Compte');
|
|
|
|
}
|
|
|
|
return response.text();
|
|
|
|
})
|
|
|
|
.then(html => {
|
|
|
|
// Insérer le HTML dans le conteneur et l'afficher
|
|
|
|
container_gestion_user.innerHTML = html;
|
|
|
|
container_gestion_user.style.display = 'block';
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.error('Erreur:', error);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2024-10-28 02:45:24 +01:00
|
|
|
<!-- Include modals -->
|
|
|
|
{% include 'Modals/gestionCompteModal.html.twig' %}
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block javascripts %}
|
|
|
|
<script src="{{ asset('js/modal.js') }}"></script> <!-- Ajout du fichier JS -->
|
2024-10-25 19:15:26 +02:00
|
|
|
{% endblock %}
|