From 18efd8f02f2211bb630e3c64f216d1be75e07e4e Mon Sep 17 00:00:00 2001 From: Aymeric SERRA Date: Fri, 10 Feb 2023 21:20:02 +0100 Subject: [PATCH] Mise a jour readme et fix --- README.md | 8 ++++++++ templates/atelier/index.html.twig | 25 +++++++++++++++---------- templates/pages/index.html.twig | 8 +++++++- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index fd58c52..902f3ee 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ - Zakarya BEN JABALLAH - Aymeric SERRA +## Acceder à un compte Admin +Par défaut la fixture créé un compte admin@admin.fr avec comme mot de passe admin. + ## Questions ### Question 1 #### Création du projet @@ -111,4 +114,9 @@ symfony console make:controller ApprentiController symfony console make:entity FormationUser symfony console make:migration symfony console d:m:m +``` + +### Question 18 +```bash +symfony console doctrine:fixtures:load ``` \ No newline at end of file diff --git a/templates/atelier/index.html.twig b/templates/atelier/index.html.twig index 8b8a194..eeeae97 100644 --- a/templates/atelier/index.html.twig +++ b/templates/atelier/index.html.twig @@ -42,16 +42,21 @@ - - {% else %} - - {% endif %} + {% if is_granted('ROLE_INSTRUCTEUR') %} + + {% endif %} + {% else %} + {% if is_granted('ROLE_INSTRUCTEUR') %} + + {% endif %} + {% endif %} {% endblock %} diff --git a/templates/pages/index.html.twig b/templates/pages/index.html.twig index 8ffca65..a178843 100644 --- a/templates/pages/index.html.twig +++ b/templates/pages/index.html.twig @@ -30,10 +30,16 @@
- Afficher tous les + Afficher tous les ateliers + {% if is_granted('ROLE_INSTRUCTEUR') %} Afficher mes ateliers + {% endif %} + {% if is_granted('ROLE_APPRENTI') %} + Afficher mes + formations + {% endif %} Déconnexion
{% endif %}