From 28171b35e0e9bdb548b031040054b51f5699083c Mon Sep 17 00:00:00 2001 From: DahmaneYanis Date: Wed, 22 Nov 2023 14:43:29 +0100 Subject: [PATCH 1/2] Adaptation welcome page --- src/Views/home.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Views/home.twig b/src/Views/home.twig index 1c14e02..1429363 100644 --- a/src/Views/home.twig +++ b/src/Views/home.twig @@ -73,13 +73,13 @@

Mes strategies

- + {% if recentTactic != null %} {% for tactic in recentTactic %} -
+

{{tactic.id}} - {{tactic.name}} - {{tactic.creation_date}}

- +
{% endfor %} {% else %} From 19d2ed01993723749e2a13f27710a4ee816e378e Mon Sep 17 00:00:00 2001 From: DahmaneYanis Date: Wed, 22 Nov 2023 14:52:33 +0100 Subject: [PATCH 2/2] Merging in progress --- src/Controller/UserController.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index c5f9ef2..3bc3d71 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -3,15 +3,18 @@ namespace App\Controller; use App\Connexion; -<<<<<<< HEAD use App\Gateway\AuthGateway; use App\Gateway\TacticInfoGateway; use App\Http\HttpResponse; use App\Http\ViewHttpResponse; use App\Model\AuthModel; use App\Model\TacticModel; +use App\Gateway\TeamGateway; +use App\Model\TeamModel; +use App\Session\SessionHandle; +use App\Controller\Sub\EditorController; -class UserController { +class UserController extends VisitorController { private TacticModel $tacticMdl; public function __construct() @@ -20,18 +23,6 @@ class UserController { $this->tacticMdl = new TacticModel(new TacticInfoGateway($con)); } -======= -use App\Gateway\TacticInfoGateway; -use App\Gateway\TeamGateway; -use App\Http\HttpResponse; -use App\Http\ViewHttpResponse; -use App\Model\TacticModel; -use App\Model\TeamModel; -use App\Session\SessionHandle; - -class UserController extends VisitorController { - ->>>>>>> d54559e01d3d734d87c95607d2dfbc5a2a616695 public function home(): HttpResponse { $listTactic = $this->tacticMdl->getLast(5); return ViewHttpResponse::twig("home.twig", ["recentTactic" => $listTactic]); @@ -44,12 +35,12 @@ class UserController extends VisitorController { public function edit(int $id, SessionHandle $session): HttpResponse { $model = new TacticModel(new TacticInfoGateway(new Connexion(get_database()))); - return (new Sub\EditorController($model))->edit($id, $session); + return (new EditorController($model))->edit($id, $session); } public function create(SessionHandle $session): HttpResponse { $model = new TacticModel(new TacticInfoGateway(new Connexion(get_database()))); - return (new Sub\EditorController($model))->createNew($session); + return (new EditorController($model))->createNew($session); } public function open(int $id, SessionHandle $session): HttpResponse {