Add car journeys to trips
This commit is contained in:
parent
bc7a2e89d0
commit
c6cb06b71e
9 changed files with 430 additions and 10 deletions
|
|
@ -367,20 +367,25 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% elif e.element_type in ("coach", "bus") %}
|
||||
{% elif e.element_type in ("coach", "bus", "car") %}
|
||||
{% set item = e.detail %}
|
||||
<div class="trip-transport-card my-1">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">
|
||||
🚌 {{ item.from }} → {{ item.to }}
|
||||
{% if e.element_type == "car" %}🚗{% else %}🚌{% endif %}
|
||||
{{ item.from }} → {{ item.to }}
|
||||
{% if item.operator %}<small class="text-muted fw-normal">{{ item.operator }}</small>{% endif %}
|
||||
</h5>
|
||||
<p class="card-text">
|
||||
{{ item.depart.strftime("%H:%M") }} → {{ item.arrive.strftime("%H:%M") }}
|
||||
{% if item.depart.hour is defined and item.arrive.hour is defined %}
|
||||
{{ item.depart.strftime("%H:%M") }} → {{ item.arrive.strftime("%H:%M") }}
|
||||
{% endif %}
|
||||
{% if item.class %}
|
||||
<span class="badge bg-info text-nowrap">{{ item.class }}</span>
|
||||
{% endif %}
|
||||
<span class="text-muted">🕒{{ trip_duration(item.depart, item.arrive) }}</span>
|
||||
{% if item.depart.hour is defined and item.arrive.hour is defined %}
|
||||
<span class="text-muted">🕒{{ trip_duration(item.depart, item.arrive) }}</span>
|
||||
{% endif %}
|
||||
{% if item.distance %}
|
||||
<span class="text-muted">🛤️ {{ "{:,.0f} km".format(item.distance) }}</span>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue