From 13034643460fb8a3412ea06dbf1692ffd46cabca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Gru=CC=88ndger?= Date: Thu, 12 Sep 2019 09:00:27 +0200 Subject: [PATCH] Better logbook container --- app/templates/device_detail.html | 59 +++++++++++++++++--------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/app/templates/device_detail.html b/app/templates/device_detail.html index 6cd859e..20ba186 100644 --- a/app/templates/device_detail.html +++ b/app/templates/device_detail.html @@ -44,34 +44,37 @@

Logbook

- - - - - - - - - - - {% for entry in device.logbook %} - - - - - - - - - - - - - {% endfor %} + + + + + + + + + + + + + + + + + + + + {% for entry in device.logbook %} + + + + + + + + + + {% endfor %} +
Nr.AircraftTypeTakeoffLandingTimeAGLRemark
{{ 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.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 %}{% if entry.landing_timestamp is not none and entry.landing_airport.id == sel_airport %} {{ entry.landing_timestamp.strftime('%H:%M') }} {% endif %}{% if entry.landing_track is not none and entry.landing_airport.id == sel_airport %} {{ '%02d' | format(entry.landing_track/10) }} {% endif %}{% 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 }} - {% endif %} -
Nr.AirportTime UTCDurationAGL
TakeoffLandingTakeoffLanding
{{ loop.index }}{% if entry.takeoff_airport is not none %} {{ entry.takeoff_airport.name }} {% endif %}{% if entry.landing_airport is not none %} {{ entry.landing_airport.name }} {% endif %}{% if entry.takeoff_timestamp is not none %} {{ entry.takeoff_timestamp.strftime('%H:%M') }} {% endif %}{% if entry.landing_timestamp is not none %} {{ entry.landing_timestamp.strftime('%H:%M') }} {% endif %}{% 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 %}