Show end times for travel
This commit is contained in:
parent
38f2e10c6d
commit
75242c2952
3 changed files with 31 additions and 13 deletions
|
|
@ -1,5 +1,7 @@
|
|||
{% macro display_datetime(dt) %}{{ dt.strftime("%a, %d, %b %Y %H:%M %z") }}{% endmacro %}
|
||||
{% macro display_time(dt) %}{{ dt.strftime("%H:%M %z") }}{% endmacro %}
|
||||
{% macro display_time(dt) %}
|
||||
{% if dt %}{{ dt.strftime("%H:%M %z") }}{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro display_date(dt) %}{{ dt.strftime("%a %-d %b %Y") }}{% endmacro %}
|
||||
{% macro display_date_no_year(dt) %}{{ dt.strftime("%a %-d %b") }}{% endmacro %}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,14 +111,18 @@
|
|||
{% set c = get_country(e.detail.country) %}
|
||||
<div>
|
||||
{{ e.get_emoji() }} {{ e.title }} {{ c.flag }}
|
||||
({{ accommodation_label[e.element_type] }} {{ display_time(e.when) }})
|
||||
({{ accommodation_label[e.element_type] }} {{ display_time(e.start_time) }})
|
||||
</div>
|
||||
{% else %}
|
||||
<div>
|
||||
{{ e.get_emoji() }}
|
||||
{{ display_time(e.when) }}
|
||||
{{ display_time(e.start_time) }}
|
||||
–
|
||||
{{ e.title }}
|
||||
{{ e.start_loc }}
|
||||
→
|
||||
{{ display_time(e.end_time) }}
|
||||
–
|
||||
{{ e.end_loc }}
|
||||
{% if e.element_type == "flight" %}
|
||||
<span class="text-nowrap"><strong>airline:</strong> {{ e.detail.airline_name }}</span>
|
||||
<span class="text-nowrap"><strong>flight number:</strong> {{ e.detail.airline }}{{ e.detail.flight_number }}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue