Prefer ICAO flight number for some airlines
This commit is contained in:
parent
8cd2335630
commit
503d39e6b8
4 changed files with 42 additions and 13 deletions
|
|
@ -118,7 +118,7 @@
|
|||
{% endfor %}
|
||||
|
||||
{% for item in booking.flights %}
|
||||
{% set full_flight_number = item.airline + item.flight_number %}
|
||||
{% set full_flight_number = item.airline_code + item.flight_number %}
|
||||
{% set radarbox_url = "https://www.radarbox.com/data/flights/" + full_flight_number %}
|
||||
<div class="grid-item"></div>
|
||||
<div class="grid-item"></div>
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% macro flight_row(item) %}
|
||||
{% set full_flight_number = item.airline + item.flight_number %}
|
||||
{% set full_flight_number = item.airline_code + item.flight_number %}
|
||||
{% set radarbox_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">{{ item.from }} → {{ item.to }}</div>
|
||||
|
|
@ -373,10 +373,10 @@
|
|||
–
|
||||
{{ e.end_loc }} {{ flag(trip, e.end_country.flag) }}
|
||||
{% if e.element_type == "flight" %}
|
||||
{% set full_flight_number = e.detail.airline + e.detail.flight_number %}
|
||||
{% set full_flight_number = e.detail.airline_code + e.detail.flight_number %}
|
||||
{% set radarbox_url = "https://www.radarbox.com/data/flights/" + full_flight_number %}
|
||||
<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>
|
||||
<span class="text-nowrap"><strong>flight number:</strong> {{ full_flight_number }}</span>
|
||||
{% if e.detail.duration %}
|
||||
<span class="text-nowrap"><strong>duration:</strong> {{ e.detail.duration }}</span>
|
||||
{% endif %}
|
||||
|
|
@ -387,7 +387,7 @@
|
|||
{% endif %}
|
||||
{% if e.element_type == "flight" %}
|
||||
<a href="https://www.flightradar24.com/data/flights/{{ full_flight_number | lower }}">flightradar24</a>
|
||||
| <a href="https://uk.flightaware.com/live/flight/{{ full_flight_number | replace("U2", "EZY") }}">FlightAware</a>
|
||||
| <a href="https://uk.flightaware.com/live/flight/{{ full_flight_number }}">FlightAware</a>
|
||||
| <a href="{{ radarbox_url }}">radarbox</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue