From 34d1ee3b30c6b5a67835728d6ac6d81cf2b5e00b Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Mon, 21 Oct 2024 10:20:09 +0100 Subject: [PATCH] Add photo links to trip and day summaries Enhance trip UI by adding photo links for authenticated users. This provides quick access to relevant trip photos. Closes: #184 --- templates/trip/list.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/trip/list.html b/templates/trip/list.html index 5db622d..14f829d 100644 --- a/templates/trip/list.html +++ b/templates/trip/list.html @@ -84,7 +84,11 @@ {% endfor %} {% if end %} -
Dates: {{ display_date_no_year(trip.start) }} to {{ display_date_no_year(end) }}
+
Dates: {{ display_date_no_year(trip.start) }} to {{ display_date_no_year(end) }} + {% if g.user.is_authenticated and trip.start <= today %} + photos + {% endif %} +
{% else %}
Start: {{ display_date_no_year(trip.start) }} (end date missing)
{% endif %} @@ -107,7 +111,13 @@ {{ conference_list(trip) }} {% for day, elements in trip.elements_grouped_by_day() %} -

{{ display_date_no_year(day) }}

+

{{ display_date_no_year(day) }} + {% if g.user.is_authenticated and day <= today %} + + photos + + {% endif %} +

{% set accommodation_label = {"check-in": "check-in from", "check-out": "check-out by"} %} {% for e in elements %} {% if e.element_type in accommodation_label %}