Show linked events on trip page

Closes: #124
This commit is contained in:
Edward Betts 2024-01-24 12:03:56 +00:00
parent 14c25e16ed
commit 89ff92c533
3 changed files with 32 additions and 3 deletions

View file

@ -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