From 1b5f059899e7df7b47a617a559532ea86ff24640 Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 4 Jan 2022 09:37:49 +0100 Subject: [PATCH] only show (past) reservations if needed --- templates/phone/index.html | 53 +++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/templates/phone/index.html b/templates/phone/index.html index 4a82de4f..2a9a6642 100644 --- a/templates/phone/index.html +++ b/templates/phone/index.html @@ -7,20 +7,22 @@ {% endblock %} {% block default_content %} -
-
-

Your current numbers

+ {% if reservations|length > 0 %} +
+
+

Your current numbers

- {% for reservation in reservations %} - - {% endfor %} + {% for reservation in reservations %} + + {% endfor %} +
-
+ {% endif %}
@@ -32,7 +34,8 @@
- We'll never share your email with anyone else.
@@ -54,21 +57,23 @@
-
-
-

Past Reservations

+ {% if past_reservations|length > 0 %} +
+
+

Past Reservations

- {% for reservation in past_reservations %} -
- - {{ reservation.number.number }} ➡ - - ended {{ reservation.end.humanize() }} -
- {% endfor %} + {% for reservation in past_reservations %} +
+ + {{ reservation.number.number }} ➡ + + ended {{ reservation.end.humanize() }} +
+ {% endfor %} +
-
+ {% endif %} {% endblock %}