From 824285a4cf42711fa3e03500a10233cf01169ea4 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 3 Jan 2024 17:22:04 +0000 Subject: [PATCH] Add links to accommodation --- templates/accommodation.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/templates/accommodation.html b/templates/accommodation.html index a7f9b21..29e5bfa 100644 --- a/templates/accommodation.html +++ b/templates/accommodation.html @@ -21,10 +21,10 @@ {% macro row(item, badge) %} {% set country = get_country(item.country) %} +{% set nights = (item.to.date() - item.from.date()).days %}
{{ item.from.strftime("%a, %d %b %Y") }}
{{ item.to.strftime("%a, %d %b") }}
-
{{ (item.to.date() - item.from.date()).days }}
-
{{ item.name }}
+
{% if nights == 1 %}1 night{% else %}{{ nights }} nights{% endif %}
{{ item.operator }}
{{ item.location }}
@@ -36,6 +36,13 @@ {% endif %}
+
+ {% if item.url %} + {{ item.name }} + {% else %} + {{ item.name }} + {% endif %} +
{% endmacro %} {% macro section(heading, item_list, badge) %}