From 7658f7dd697ff21d13fed396cbe03259c12e8a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Gru=CC=88ndger?= Date: Sat, 14 Sep 2019 10:19:28 +0200 Subject: [PATCH] Fixed wrong endpoints --- app/templates/airport_detail.html | 2 +- app/templates/airports.html | 4 ++-- app/templates/logbook.html | 6 +++--- app/templates/receiver_detail.html | 2 +- app/templates/receivers.html | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/templates/airport_detail.html b/app/templates/airport_detail.html index 3f299bc..0530266 100644 --- a/app/templates/airport_detail.html +++ b/app/templates/airport_detail.html @@ -32,7 +32,7 @@ {% for device in devices %} - {{ device.address }} + {{ device.address }} {% if device.info is none %}-{% else %}{{ device.info.registration }}{% endif %} {% if device.takeoff_landings %}{% set last_action = device.takeoff_landings|last %}{% if last_action.is_takeoff == True %}↗{% else %}↘{% endif %} @ {{ last_action.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}{% endif %} {% if device.software_version is not none %}{{ device.software_version }}{% else %}-{% endif %} diff --git a/app/templates/airports.html b/app/templates/airports.html index a2c1b34..4af1157 100644 --- a/app/templates/airports.html +++ b/app/templates/airports.html @@ -30,8 +30,8 @@ {% for airport in airports %} {{ loop.index }} - {{ sel_country }} {{ airport.name }} - Logbook + {{ sel_country }} {{ airport.name }} + Logbook {% endfor %} diff --git a/app/templates/logbook.html b/app/templates/logbook.html index fb4bb52..2d6b830 100644 --- a/app/templates/logbook.html +++ b/app/templates/logbook.html @@ -52,7 +52,7 @@ {% for entry in logbook %} {{ loop.index }} - {% if entry.device.info is not none and entry.device.info.registration|length %}{{ entry.device.info.registration }}{% else %}[{{ entry.device.address }}]{% endif %} + {% if entry.device.info is not none and entry.device.info.registration|length %}{{ entry.device.info.registration }}{% else %}[{{ entry.device.address }}]{% endif %} {% if entry.device.info is not none and entry.device.info.aircraft|length %}{{ entry.device.info.aircraft }}{% else %}-{% endif %} {% if entry.takeoff_timestamp is not none and entry.takeoff_airport.id == sel_airport %} {{ entry.takeoff_timestamp.strftime('%H:%M') }} {% endif %} {% if entry.takeoff_track is not none and entry.takeoff_airport.id == sel_airport %} {{ '%02d' | format(entry.takeoff_track/10) }} {% endif %} @@ -61,8 +61,8 @@ {% if entry.duration is not none %}{{ entry.duration }}{% endif %} {% if entry.max_altitude is not none %}{{ '%0.1f'|format(entry.max_altitude - entry.takeoff_airport.altitude) }} m{% endif %} - {% if entry.takeoff_airport is not none and entry.takeoff_airport.id != sel_airport %}Take Off: {{ entry.takeoff_airport.country_code }} {{ entry.takeoff_airport.name }} - {% elif entry.landing_airport is not none and entry.landing_airport.id != sel_airport %}Landing: {{ entry.landing_airport.country_code }} {{ entry.landing_airport.name }} + {% if entry.takeoff_airport is not none and entry.takeoff_airport.id != sel_airport %}Take Off: {{ entry.takeoff_airport.country_code }} {{ entry.takeoff_airport.name }} + {% elif entry.landing_airport is not none and entry.landing_airport.id != sel_airport %}Landing: {{ entry.landing_airport.country_code }} {{ entry.landing_airport.name }} {% endif %} diff --git a/app/templates/receiver_detail.html b/app/templates/receiver_detail.html index b2e73e6..f5db152 100644 --- a/app/templates/receiver_detail.html +++ b/app/templates/receiver_detail.html @@ -13,7 +13,7 @@ Name:{{ receiver.country.iso2 }} {{ receiver.name }} Airport: {% if airport is not none %}{{ airport.country_code }} - {% if airport.takeoff_landings %}{{ airport.name }}{% else %}{{ airport.name }}{% endif %} + {% if airport.takeoff_landings %}{{ airport.name }}{% else %}{{ airport.name }}{% endif %} {% else %}-{% endif %} diff --git a/app/templates/receivers.html b/app/templates/receivers.html index 8775cba..5b74d4c 100644 --- a/app/templates/receivers.html +++ b/app/templates/receivers.html @@ -28,7 +28,7 @@ {% for receiver in receivers %} - {{ receiver.country.iso2 }} {{ receiver.name }} + {{ receiver.country.iso2 }} {{ receiver.name }} {{ receiver.altitude|int }} m {% endfor %}