kopia lustrzana https://github.com/glidernet/ogn-python
Better logbook container
rodzic
ce64eb7792
commit
1303464346
|
@ -44,34 +44,37 @@
|
||||||
<div class="panel panel-success">
|
<div class="panel panel-success">
|
||||||
<div class="panel-heading"><h3 class="panel-title">Logbook</h3></div>
|
<div class="panel-heading"><h3 class="panel-title">Logbook</h3></div>
|
||||||
<table class="datatable table table-striped table-bordered">
|
<table class="datatable table table-striped table-bordered">
|
||||||
<tr>
|
<theader>
|
||||||
<th>Nr.</th>
|
<tr>
|
||||||
<th>Aircraft</th>
|
<th>Nr.</th>
|
||||||
<th>Type</th>
|
<th colspan="2">Airport</th>
|
||||||
<th colspan="2">Takeoff</th>
|
<th colspan="2">Time UTC</th>
|
||||||
<th colspan="2">Landing</th>
|
<th>Duration</th>
|
||||||
<th>Time</th>
|
<th>AGL</th>
|
||||||
<th>AGL</th>
|
</tr>
|
||||||
<th>Remark</th>
|
<tr>
|
||||||
</tr>
|
<th></th>
|
||||||
{% for entry in device.logbook %}
|
<th>Takeoff</th>
|
||||||
<tr>
|
<th>Landing</th>
|
||||||
<td>{{ loop.index }}</td>
|
<th>Takeoff</th>
|
||||||
<td><a href="{{ url_for('device_detail', id=entry.device.id) }}">{% if entry.device.info is not none and entry.device.info.registration|length %}{{ entry.device.info.registration }}{% else %}[{{ entry.device.address }}]{% endif %}</a></td>
|
<th>Landing</th>
|
||||||
<td>{% if entry.device.info is not none and entry.device.info.aircraft|length %}{{ entry.device.info.aircraft }}{% else %}-{% endif %}</td>
|
<th></th>
|
||||||
<td>{% if entry.takeoff_timestamp is not none and entry.takeoff_airport.id == sel_airport %} {{ entry.takeoff_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
<th></th>
|
||||||
<td>{% if entry.takeoff_track is not none and entry.takeoff_airport.id == sel_airport %} {{ '%02d' | format(entry.takeoff_track/10) }} {% endif %}</td>
|
</tr>
|
||||||
<td>{% if entry.landing_timestamp is not none and entry.landing_airport.id == sel_airport %} {{ entry.landing_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
</theader>
|
||||||
<td>{% if entry.landing_track is not none and entry.landing_airport.id == sel_airport %} {{ '%02d' | format(entry.landing_track/10) }} {% endif %}</td>
|
<tbody>
|
||||||
<td>{% if entry.duration is not none %}{{ entry.duration }}{% endif %}</td>
|
{% for entry in device.logbook %}
|
||||||
<td>{% if entry.max_altitude is not none %}{{ '%0.1f'|format(entry.max_altitude - entry.takeoff_airport.altitude) }} m{% endif %}</td>
|
<tr>
|
||||||
<td>
|
<td>{{ loop.index }}</td>
|
||||||
{% if entry.takeoff_airport is not none and entry.takeoff_airport.id != sel_airport %}Take Off: <img src="{{ url_for('static', filename='img/Transparent.gif') }}" class="flag flag-{{ entry.takeoff_airport.country_code|lower }}" alt="{{ entry.takeoff_airport.country_code }}"/> <a href="{{ url_for('logbook', country=entry.takeoff_airport.country_code, airport=entry.takeoff_airport.id, date=sel_date) }}">{{ entry.takeoff_airport.name }}</a>
|
<td>{% if entry.takeoff_airport is not none %} {{ entry.takeoff_airport.name }} {% endif %}</td>
|
||||||
{% elif entry.landing_airport is not none and entry.landing_airport.id != sel_airport %}Landing: <img src="{{ url_for('static', filename='img/Transparent.gif') }}" class="flag flag-{{ entry.landing_airport.country_code|lower }}" alt="{{ entry.landing_airport.country_code }}"/> <a href="{{ url_for('logbook', country=entry.takeoff_airport.country_code, airport=entry.landing_airport.id, date=sel_date) }}">{{ entry.landing_airport.name }}</a>
|
<td>{% if entry.landing_airport is not none %} {{ entry.landing_airport.name }} {% endif %}</td>
|
||||||
{% endif %}
|
<td>{% if entry.takeoff_timestamp is not none %} {{ entry.takeoff_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
||||||
</td>
|
<td>{% if entry.landing_timestamp is not none %} {{ entry.landing_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
||||||
</tr>
|
<td>{% if entry.duration is not none %}{{ entry.duration }}{% endif %}</td>
|
||||||
{% endfor %}
|
<td>{% if entry.max_altitude is not none %}{{ '%0.1f'|format(entry.max_altitude - entry.takeoff_airport.altitude) }} m{% endif %}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue