From 4c246292a245ee055798ee8aa0d9691abceabb24 Mon Sep 17 00:00:00 2001
From: Nicolas <nicolas@bejean.eu>
Date: Sat, 18 Aug 2018 13:17:08 +0200
Subject: [PATCH] Mise en place des commentaires TODO dans le code Suppression
 du TODO dans le readme.md

---
 README.md                                            | 6 ------
 view/frontend/templates/widget/category_widget.phtml | 9 +++++++++
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 5e8a11b..dd201cf 100755
--- a/README.md
+++ b/README.md
@@ -3,12 +3,6 @@
 
 Permet d'afficher une catégorie ou une liste de catégories avec leur image.
 
-## To Do
-
-- Il faut pouvoir éviter d'avoir un foreach si il n'y a qu'une seule catégorie
-- Il faut pouvoir afficher n fois la même catégorie
-- Pouvoir sélectionner un template de rendu > Traité mais c'est pas fait correctement
-
 ## Variables
 
 - widget_title (setWidgetTitle) : Optionnel : Titre H2 du widget
diff --git a/view/frontend/templates/widget/category_widget.phtml b/view/frontend/templates/widget/category_widget.phtml
index 805889c..f4c9432 100755
--- a/view/frontend/templates/widget/category_widget.phtml
+++ b/view/frontend/templates/widget/category_widget.phtml
@@ -22,6 +22,10 @@
             <?php if($categories != null): ?>
             <div class="categories">
                 <?php
+                /*
+                 * TODO : Supprimer le foreach lorsqu'il n'y a qu'un enfant
+                 * TODO : Permettre d'afficher plusieurs fois la même catégorie
+                 */
                 foreach($categories as $category):
                     $cat = $this->getCategoryModel($category->getId());
 
@@ -34,6 +38,11 @@
                 <?php endforeach; ?>
             </div>
             <?php endif; ?>
+            <?php
+            /*
+             * TODO : Pouvoir sélectionner un template de rendu sans intervenir dans le code
+             */
+            ?>
         <?php } elseif ($this->getModel("widget/category_widget_img_background.phtml")) { ?>
             <?php if($categories != null): ?>
                 <div class="categories">
-- 
GitLab