Add radarbox.com links for flights

This commit is contained in:
Edward Betts 2024-01-10 13:26:59 +00:00
parent 82de51109f
commit 8504a3a022

View file

@ -68,6 +68,8 @@
{% endmacro %} {% endmacro %}
{% macro flight_row(item) %} {% macro flight_row(item) %}
{% set full_flight_number = item.airline + item.flight_number %}
{% set url = "https://www.radarbox.com/data/flights/" + full_flight_number %}
<div class="grid-item text-end">{{ item.depart.strftime("%a, %d %b %Y") }}</div> <div class="grid-item text-end">{{ item.depart.strftime("%a, %d %b %Y") }}</div>
<div class="grid-item">{{ item.from }} &rarr; {{ item.to }}</div> <div class="grid-item">{{ item.from }} &rarr; {{ item.to }}</div>
<div class="grid-item">{{ item.depart.strftime("%H:%M") }}</div> <div class="grid-item">{{ item.depart.strftime("%H:%M") }}</div>
@ -78,7 +80,9 @@
{% endif %} {% endif %}
</div> </div>
<div class="grid-item">{{ item.duration }}</div> <div class="grid-item">{{ item.duration }}</div>
<div class="grid-item">{{ item.airline }}{{ item.flight_number }}</div> <div class="grid-item">
<a href="{{ url }}">{{ full_flight_number }}</a>
</div>
<div class="grid-item">{{ item.booking_reference }}</div> <div class="grid-item">{{ item.booking_reference }}</div>
{% endmacro %} {% endmacro %}