2019-02-10 13:00:35 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
<div class="panel panel-success">
|
|
|
|
<div class="panel-heading"><h3 class="panel-title">Logbook</h3></div>
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
<form>
|
|
|
|
<div class="well">
|
|
|
|
<select name="country" onchange="this.form.submit();">
|
|
|
|
<option value="">(none)</option>
|
|
|
|
{% for country in countries %}
|
|
|
|
<option value="{{ country.iso2 }}"{% if sel_country == country.iso2 %} SELECTED{% endif %}>{{ country.iso2 }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
<select name="airport" onchange="this.form.submit();">
|
|
|
|
<option value="">(none)</option>
|
|
|
|
{% for airport in airports %}
|
|
|
|
<option value="{{ airport.id }}"{% if sel_airport == airport.id|string() %} SELECTED{% endif %}>{{ airport.name }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
<select name="date" onchange="this.form.submit();">
|
|
|
|
<option value="">(none)</option>
|
|
|
|
{% for date in dates %}
|
|
|
|
<option value="{{ date[0] }}"{% if sel_date|string() == date[0]|string() %} SELECTED{% endif %}>{{ date[0] }} ({{ date[1] }})</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
2019-03-23 12:57:44 +00:00
|
|
|
{% if logbook is not none %}
|
2019-02-10 13:00:35 +00:00
|
|
|
<table class="datatable table table-striped table-bordered">
|
|
|
|
<tr>
|
|
|
|
<th>Nr.</th>
|
|
|
|
<th>Aircraft</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th colspan="2">Takeoff</th>
|
|
|
|
<th colspan="2">Landing</th>
|
|
|
|
<th>AGL</th>
|
|
|
|
</tr>
|
2019-03-23 12:57:44 +00:00
|
|
|
{% for entry in logbook %}
|
2019-02-10 13:00:35 +00:00
|
|
|
<tr>
|
|
|
|
<td>{{ loop.index }}</td>
|
2019-03-23 12:57:44 +00:00
|
|
|
<td><a href="{{ url_for('device_detail', id=entry.device.id) }}">{% if entry.device.info is none %}{{ entry.device.address }}{% else %}{{ entry.device.info.registration }}{% endif %}</a></td>
|
|
|
|
<td>{% if entry.device.info is none %}(unknown){% else %}{{ entry.device.info.aircraft }}{% endif %}</td>
|
|
|
|
<td>{% if entry.takeoff_timestamp is not none %} {{ entry.takeoff_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
|
|
|
<td>{% if entry.takeoff_track is not none %} {{ '%02d' | format(entry.takeoff_track/10) }} {% endif %}</td>
|
|
|
|
<td>{% if entry.landing_timestamp is not none %} {{ entry.landing_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
|
|
|
<td>{% if entry.landing_track is not none %} {{ '%02d' | format(entry.landing_track/10) }} {% endif %}</td>
|
|
|
|
<td>{% if entry.max_altitude is not none %} {{ entry.max_altitude }} {% endif %}</td>
|
2019-02-10 13:00:35 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|