From 0729b81d0609201d776662ba7ed404192b95144c Mon Sep 17 00:00:00 2001 From: afornerot Date: Fri, 22 Nov 2024 08:47:33 +0100 Subject: [PATCH] svg --- assets/app.js | 1 + src/Command/InitCommand.php | 3 +- src/Controller/HomeController.php | 5 +- templates/base.html.twig | 117 +++++++++++++++++++++++++++-- templates/home/index.html.twig | 15 +--- templates/security/login.html.twig | 65 ++++++++-------- 6 files changed, 151 insertions(+), 55 deletions(-) diff --git a/assets/app.js b/assets/app.js index 9d6984e..7e8e3a3 100644 --- a/assets/app.js +++ b/assets/app.js @@ -3,6 +3,7 @@ import './bootstrap.js'; // jQuery import $ from 'jquery'; window.$ = $; +window.jQuery = $; // Bootstrap import 'bootstrap' diff --git a/src/Command/InitCommand.php b/src/Command/InitCommand.php index 265d2cd..4118c10 100644 --- a/src/Command/InitCommand.php +++ b/src/Command/InitCommand.php @@ -56,8 +56,9 @@ class InitCommand extends Command $user->setUsername("admin"); $user->setPassword($hashedPassword); $this->em->persist($user); - $this->em->flush(); } + $user->setRoles(["ROLE_ADMIN"]); + $this->em->flush(); // Création d'un company par defaut $io->text("> Création d'un company par defaut"); diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php index a6eeda2..5921c05 100644 --- a/src/Controller/HomeController.php +++ b/src/Controller/HomeController.php @@ -12,7 +12,8 @@ class HomeController extends AbstractController public function index(): Response { return $this->render('home/index.html.twig', [ - 'controller_name' => 'HomeController', - ]); + 'usemenu' => true, + 'usesidebar' => true, + ]); } } diff --git a/templates/base.html.twig b/templates/base.html.twig index 0da7164..07fbfee 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -2,17 +2,87 @@ - {% block title %}Welcome!{% endblock %} - - {% block stylesheets %} - {% endblock %} + {{appName}}{% block title %}{% endblock %} + + {% block javascripts %} {% block importmap %}{{ importmap('app') }}{% endblock %} {% endblock %} + + -