diff --git a/templates/wishlist/index.html.twig b/templates/wishlist/index.html.twig index af98d2ce996a64a003f5a624d7eb930a46f736a7..72227a94646d92b3540afaa00e16c1b6602432ca 100644 --- a/templates/wishlist/index.html.twig +++ b/templates/wishlist/index.html.twig @@ -1,6 +1,6 @@ {% extends 'base.html.twig' %} -{% block title %} My Wishlists {% endblock %} +{% block title %}My Wishlists{% endblock %} {% block body %} <style> @@ -71,6 +71,11 @@ border-radius: 5px; font-size: 1.5em; } + .wishlist-footer { + margin-top: 10px; + font-size: 0.9em; + color: #e0f7fa; + } .wishlist-actions { display: flex; gap: 10px; @@ -106,19 +111,31 @@ <div class="container"> {% for wishlist in wishlists %} - <div class="wishlist"> - <h2>{{ wishlist.name }}</h2> - <div class="wishlist-items"> - {% for item in wishlist.items %} - <div class="wishlist-item">📷</div> - {% endfor %} - </div> - <div class="wishlist-actions"> - <button title="Share wishlist">↗</button> - <button title="Edit title">✏</button> - <button title="Delete wishlist">🗑</button> + <div class="wishlist"> + <h2> + <a href="{{ path('app_wishlist_show', { 'id': wishlist.id }) }}"> + {{ wishlist.name }} + </a> + </h2> + + <div class="wishlist-items"> + {% for item in wishlist.items %} + <div class="wishlist-item">📷</div> + {% else %} + <p class="empty-state">No items yet.</p> + {% endfor %} + </div> + + <p class="wishlist-footer">{{ wishlist.deadline ? wishlist.deadline|date('Y-m-d') : 'No deadline' }}</p> + + <div class="wishlist-actions"> + <button title="Share wishlist">↗</button> + <button title="Edit title">✏</button> + <button title="Delete wishlist">🗑</button> + </div> </div> - </div> + {% else %} + <p>You have no wishlists yet. Start by <a href="{{ path('app_wishlist_new') }}">creating one</a>.</p> {% endfor %} </div> -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/templates/wishlist/new.html.twig b/templates/wishlist/new.html.twig index db732bbcd22cde1ffd04c5ca258bff0bd8220913..4f84df8ea8b969131ec82da8fab4cd07a70da231 100644 --- a/templates/wishlist/new.html.twig +++ b/templates/wishlist/new.html.twig @@ -1,3 +1,4 @@ +{# templates/wishlist/new.html.twig #} {% extends 'base.html.twig' %} {% block title %}Create New Wishlist{% endblock %} @@ -99,7 +100,7 @@ {% block body %} <div class="container"> <h1 class="my-4">Create New Wishlist</h1> - + {{ form_start(form, {'attr': {'class': 'wishlist-form'}}) }} <div class="form-group"> {{ form_label(form.name) }} @@ -128,4 +129,4 @@ </div> {{ form_end(form) }} </div> -{% endblock %} +{% endblock %} \ No newline at end of file