From 21f40c7ee51a3e1a7d086e04a573357da10073c9 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 16 Jan 2023 17:17:23 +0100 Subject: [PATCH 1/4] category_list implemented --- Views/common/category_list.php | 19 +++++++++++++++++++ Views/common/header.php | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 Views/common/category_list.php diff --git a/Views/common/category_list.php b/Views/common/category_list.php new file mode 100644 index 0000000..1d9a2f4 --- /dev/null +++ b/Views/common/category_list.php @@ -0,0 +1,19 @@ + "type_de_cuisson", + "Temps de préparation" => "temps_de_preparation", + "Difficulté" => "difficulte", + "Végan" => "vegan", + "Sans gluten" => "sans_gluten", + "Sans lactose" => "sans_lactose"); +?> + + \ No newline at end of file diff --git a/Views/common/header.php b/Views/common/header.php index a15c2b3..a1381c3 100644 --- a/Views/common/header.php +++ b/Views/common/header.php @@ -8,7 +8,6 @@ $array_header = array( ); ?>
- -
From 3b8207d3b18a744bb077d15acc56fb2ac7630156 Mon Sep 17 00:00:00 2001 From: Capelier-Marla Date: Tue, 17 Jan 2023 10:51:15 +0100 Subject: [PATCH 2/4] moved and fixed category_list --- Views/{common => home}/category_list.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename Views/{common => home}/category_list.php (64%) diff --git a/Views/common/category_list.php b/Views/home/category_list.php similarity index 64% rename from Views/common/category_list.php rename to Views/home/category_list.php index 1d9a2f4..801551d 100644 --- a/Views/common/category_list.php +++ b/Views/home/category_list.php @@ -1,5 +1,5 @@ "type_de_cuisson", "Temps de préparation" => "temps_de_preparation", "Difficulté" => "difficulte", @@ -12,8 +12,8 @@ $allCategory array( - \ No newline at end of file + From 5d7c4628c6d077a5cdc20569513ee8716535649b Mon Sep 17 00:00:00 2001 From: Capelier-Marla Date: Fri, 20 Jan 2023 09:07:10 +0100 Subject: [PATCH 3/4] move category_list to common and added it to pages where we will see it (+ fixed home view array) --- Views/{home => common}/category_list.php | 0 Views/common/recipe.php | 4 ++-- Views/home/view.php | 2 ++ Views/recipe/view.php | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) rename Views/{home => common}/category_list.php (100%) diff --git a/Views/home/category_list.php b/Views/common/category_list.php similarity index 100% rename from Views/home/category_list.php rename to Views/common/category_list.php diff --git a/Views/common/recipe.php b/Views/common/recipe.php index 7b46cc1..1cabff5 100644 --- a/Views/common/recipe.php +++ b/Views/common/recipe.php @@ -1,5 +1,5 @@ -"> - " alt=""> +"> + " alt="">

diff --git a/Views/home/view.php b/Views/home/view.php index 2634ea2..ce83fb7 100644 --- a/Views/home/view.php +++ b/Views/home/view.php @@ -1,5 +1,7 @@ Cook + +

Nos idées recettes:

diff --git a/Views/recipe/view.php b/Views/recipe/view.php index 26b0cc2..c0cd8fa 100644 --- a/Views/recipe/view.php +++ b/Views/recipe/view.php @@ -1,3 +1,5 @@ + +
" alt="Image d'illustration de la recette"> From 6a91c2a9be3946cee7cbd8c49008f0bbf8e955e6 Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Fri, 20 Jan 2023 09:20:57 +0100 Subject: [PATCH 4/4] change keys passed to the view --- Controllers/DefaultController.php | 12 ++++++------ Views/common/recipe.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Controllers/DefaultController.php b/Controllers/DefaultController.php index 0590473..04045d8 100644 --- a/Controllers/DefaultController.php +++ b/Controllers/DefaultController.php @@ -7,21 +7,21 @@ final class DefaultController { $array_recipes = array( array( - "LINK" => "/recipe/view/1", + "RECIPE_LINK" => "/recipe/view/1", "NAME" => "Pâte à crêpe", - "IMG" => "/static/img/recipes/1.jpg", + "IMG_LINK" => "/static/img/recipes/1.jpg", "NOTE" => "4.5" ), array( - "LINK" => "/recipe/view/1", + "RECIPE_LINK" => "/recipe/view/1", "NAME" => "Pâte à crêpe", - "IMG" => "/static/img/recipes/1.jpg", + "IMG_LINK" => "/static/img/recipes/1.jpg", "NOTE" => "4.5" ), array( - "LINK" => "/recipe/view/1", + "RECIPE_LINK" => "/recipe/view/1", "NAME" => "Pâte à crêpe", - "IMG" => "/static/img/recipes/1.jpg", + "IMG_LINK" => "/static/img/recipes/1.jpg", "NOTE" => "4.5" ), ); diff --git a/Views/common/recipe.php b/Views/common/recipe.php index 1cabff5..7b46cc1 100644 --- a/Views/common/recipe.php +++ b/Views/common/recipe.php @@ -1,5 +1,5 @@ -"> - " alt=""> +"> + " alt="">