Improve trip list template
This commit is contained in:
parent
5758d3f1d0
commit
a96aefe22b
|
@ -116,40 +116,8 @@
|
|||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% for item in trip.conferences %}
|
||||
{% 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.name }}</a>
|
||||
<small class="text-muted">
|
||||
{{ display_date_no_year(item.start) }} to {{ display_date_no_year(item.end) }}
|
||||
</small>
|
||||
</h5>
|
||||
<p class="card-text">
|
||||
Topic: {{ item.topic }}
|
||||
| Venue: {{ item.venue }}
|
||||
| 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.free %}
|
||||
| <span class="badge bg-success text-nowrap">free to attend</span>
|
||||
{% elif item.price and item.currency %}
|
||||
| <span class="badge bg-info text-nowrap">price: {{ item.price }} {{ item.currency }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{{ conference_list(trip) }}
|
||||
|
||||
{% set date_heading = None %}
|
||||
{% for day, elements in trip.elements_grouped_by_day() %}
|
||||
<h4>{{ display_date_no_year(day) }}</h4>
|
||||
{% 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 %}
|
||||
<div class="card my-1">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">
|
||||
<a href="{{ item.url }}">{{ item.name }}</a>
|
||||
<small class="text-muted">
|
||||
{{ display_date_no_year(item.start) }} to {{ display_date_no_year(item.end) }}
|
||||
</small>
|
||||
</h5>
|
||||
<p class="card-text">
|
||||
Topic: {{ item.topic }}
|
||||
| Venue: {{ item.venue }}
|
||||
| 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.free %}
|
||||
| <span class="badge bg-success text-nowrap">free to attend</span>
|
||||
{% elif item.price and item.currency %}
|
||||
| <span class="badge bg-info text-nowrap">price: {{ item.price }} {{ item.currency }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid d-flex flex-column flex-md-row">
|
||||
|
|
Loading…
Reference in a new issue