diff --git a/templates/trip/list.html b/templates/trip/list.html index 07dad88..a0f3f48 100644 --- a/templates/trip/list.html +++ b/templates/trip/list.html @@ -116,40 +116,8 @@ {% endfor %} {% endif %} - {% for item in trip.conferences %} - {% set country = get_country(item.country) if item.country else None %} -
-
-
- {{ item.name }} - - {{ display_date_no_year(item.start) }} to {{ display_date_no_year(item.end) }} - -
-

- Topic: {{ item.topic }} - | Venue: {{ item.venue }} - | Location: {{ item.location }} - {% if country %} - {{ country.flag }} - {% elif item.online %} - 💻 Online - {% else %} - - country code {{ item.country }} not found - - {% endif %} - {% if item.free %} - | free to attend - {% elif item.price and item.currency %} - | price: {{ item.price }} {{ item.currency }} - {% endif %} -

-
-
- {% endfor %} + {{ conference_list(trip) }} - {% set date_heading = None %} {% for day, elements in trip.elements_grouped_by_day() %}

{{ display_date_no_year(day) }}

{% set accommodation_label = {"check-in": "check-in from", "check-out": "check-out by"} %} @@ -176,6 +144,43 @@ {% endif %} {% endmacro %} +{% macro conference_list(trip) %} + {% for item in trip.conferences %} + {% set country = get_country(item.country) if item.country else None %} +
+
+
+ {{ item.name }} + + {{ display_date_no_year(item.start) }} to {{ display_date_no_year(item.end) }} + +
+

+ Topic: {{ item.topic }} + | Venue: {{ item.venue }} + | Location: {{ item.location }} + {% if country %} + {{ country.flag }} + {% elif item.online %} + 💻 Online + {% else %} + + country code {{ item.country }} not found + + {% endif %} + {% if item.free %} + | free to attend + {% elif item.price and item.currency %} + | price: {{ item.price }} {{ item.currency }} + {% endif %} +

+
+
+ {% endfor %} + + +{% endmacro %} + {% block content %}