diff --git a/agenda/trip.py b/agenda/trip.py index 6234bf6..d5f9adc 100644 --- a/agenda/trip.py +++ b/agenda/trip.py @@ -106,7 +106,11 @@ def collect_trip_coordinates(trip: Trip) -> list[StrDict]: coords = [] - src = [("accommodation", trip.accommodation), ("conference", trip.conferences)] + src = [ + ("accommodation", trip.accommodation), + ("conference", trip.conferences), + ("event", trip.events), + ] for coord_type, item_list in src: coords += [ { diff --git a/static/js/map.js b/static/js/map.js index addc29a..21872c9 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -18,6 +18,7 @@ var icons = { "airport": emoji_icon("✈️"), "accommodation": emoji_icon("🏨"), "conference": emoji_icon("🎤"), + "event": emoji_icon("🍷"), } function build_map(map_id, coordinates, routes) { diff --git a/templates/trip_page.html b/templates/trip_page.html index 001ba6e..03e86d1 100644 --- a/templates/trip_page.html +++ b/templates/trip_page.html @@ -137,8 +137,32 @@ | Location: {{ item.location }} {% if country %} {{ country.flag }} - {% elif item.online %} - 💻 Online + {% else %} + <span class="text-bg-danger p-2"> + country code <strong>{{ item.country }}</strong> not found + </span> + {% endif %} + {% if item.price and item.currency %} + | <span class="badge bg-info text-nowrap">price: {{ item.price }} {{ item.currency }}</span> + {% endif %} + </p> + </div> + </div> + {% endfor %} + + {% for item in trip.events %} + {% set country = get_country(item.country) if item.country else None %} + <div class="card my-1"> + <div class="card-body"> + <h5 class="card-title"> + <a href="{{ item.url }}">{{ item.title }}</a> + <small class="text-muted">{{ display_date_no_year(item.date) }}</small> + </h5> + <p class="card-text"> + Address: {{ item.address }} + | Location: {{ item.location }} + {% if country %} + {{ country.flag }} {% else %} <span class="text-bg-danger p-2"> country code <strong>{{ item.country }}</strong> not found