From a0969e80ab3236a96856864ae49133f6d759ab4d Mon Sep 17 00:00:00 2001
From: mounouar21 <mounouar21@gmail.com>
Date: Tue, 25 Mar 2025 18:25:55 +0100
Subject: [PATCH] [Progress] showing all wishlists on the wishlist page

---
 templates/wishlist/index.html.twig | 25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/templates/wishlist/index.html.twig b/templates/wishlist/index.html.twig
index e363ce0d..685f80f9 100644
--- a/templates/wishlist/index.html.twig
+++ b/templates/wishlist/index.html.twig
@@ -16,12 +16,13 @@
     </div>
     
     <div class="container">
+        {% for wishlist in Wishlists %}
         <div class="wishlist">
-            <h2>wish list 1 title</h2>
+            <h2>{{ wishlist.title }}</h2>
             <div class="wishlist-items">
-                <div class="wishlist-item">📷</div>
-                <div class="wishlist-item">📷</div>
-                <div class="wishlist-item">📷</div>
+            {% for item in wishlist.items %}
+            <div class="wishlist-item">📷</div>
+            {% endfor %}
             </div>
             <p class="wishlist-footer">Authors: name1, name2</p>
             <div class="wishlist-actions">
@@ -30,20 +31,6 @@
                 <button title="Delete wishlist">🗑</button>
             </div>
         </div>
-        
-        <div class="wishlist">
-            <h2>wish list 2 title</h2>
-            <div class="wishlist-items">
-                <div class="wishlist-item">📷</div>
-                <div class="wishlist-item">📷</div>
-                <div class="wishlist-item">📷</div>
-            </div>
-            <p class="wishlist-footer">Authors: name1</p>
-            <div class="wishlist-actions">
-                <button title="Share wishlist">↗</button>
-                <button title="Edit title">✏</button>
-                <button title="Delete wishlist">🗑</button>
-            </div>
-        </div>
+        {% end for %}
     </div>
     {% endblock %}
-- 
GitLab