{% extends "base.html" %} {% block title %}{{ trip.title }} ({{ display_date(trip.start) }}){% endblock %} {% from "macros.html" import trip_link, display_datetime, display_date_no_year, display_date, conference_row, accommodation_row, flight_row, train_row with context %} {% set row = { "flight": flight_row, "train": train_row } %} {% macro next_and_previous() %}

{% if prev_trip %} previous: {{ trip_link(prev_trip) }} ({{ (trip.start - prev_trip.end).days }} days) {% endif %} {% if next_trip %} next: {{ trip_link(next_trip) }} ({{ (next_trip.start - trip.end).days }} days) {% endif %}

{% endmacro %} {% block style %} {% if coordinates %} {% endif %} {% set conference_column_count = 7 %} {% set accommodation_column_count = 7 %} {% set travel_column_count = 8 %} {% endblock %} {% set end = trip.end %} {% block content %}
{{ next_and_previous() }}

{{ trip.title }}

{% if end %} {{ display_date_no_year(trip.start) }} to {{ display_date_no_year(end) }} ({{ (end - trip.start).days }} nights) {% else %} {{ display_date_no_year(trip.start) }} (end date missing) {% endif %}

{#
Countries: {{ trip.countries_str }}
#}
Locations: {{ trip.locations_str }}
{% set delta = human_readable_delta(trip.start) %} {% if delta %}
How long until trip: {{ delta }}
{% 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 %} {% for item in trip.accommodation %} {% set country = get_country(item.country) if item.country else None %} {% set nights = (item.to.date() - item.from.date()).days %}
{% if item.operator %}{{ item.operator }}: {% endif %} {{ item.name }} {{ display_date_no_year(item.from) }} to {{ display_date_no_year(item.to) }} ({% if nights == 1 %}1 night{% else %}{{ nights }} nights{% endif %})

Address: {{ item.address }} | Location: {{ item.location }} {% if country %} {{ country.flag }} {% else %} country code {{ item.country }} not found {% endif %} {% if g.user.is_authenticated and item.price and item.currency %} | price: {{ item.price }} {{ item.currency }} {% endif %}

{% endfor %} {% for item in trip.events %} {% set country = get_country(item.country) if item.country else None %}
{{ item.title }} {{ display_date_no_year(item.date) }}

Address: {{ item.address }} | Location: {{ item.location }} {% if country %} {{ country.flag }} {% else %} country code {{ item.country }} not found {% endif %} {% if g.user.is_authenticated and item.price and item.currency %} | price: {{ item.price }} {{ item.currency }} {% endif %}

{% endfor %} {% for item in trip.travel %}
{% if item.type == "flight" %} ✈️ {{ item.from_airport.name }} ({{ item.from_airport.iata}}) → {{ item.to_airport.name }} ({{item.to_airport.iata}}) {% elif item.type == "train" %} 🚆 {{ item.from }} → {{ item.to }} {% endif %}

{% if item.type == "flight" %}

{{ item.airline_name }} ({{ item.airline }}) ✨ {{ display_datetime(item.depart) }} → {{ item.arrive.strftime("%H:%M %z") }} ✨ {{ ((item.arrive - item.depart).total_seconds() // 60) | int }} mins{{ item.airline }}{{ item.flight_number }}
{% elif item.type == "train" %}
{{ display_datetime(item.depart) }} → {{ item.arrive.strftime("%H:%M %z") }} {% if item.class %} {{ item.class }} {% endif %} {{ ((item.arrive - item.depart).total_seconds() // 60) | int }} mins
{% endif %}

{% endfor %}

Holidays

{% if holidays %} {% for item in holidays %} {% set country = get_country(item.country) %} {% if loop.first or item.date != loop.previtem.date %} {% else %} {% endif %} {% endfor %}
{{ display_date(item.date) }}{{ country.flag }} {{ country.name }} {{ item.display_name }}
{% else %}

No public holidays during trip.

{% endif %}
{{ next_and_previous() }}
{% endblock %} {% block scripts %} {% endblock %}