ogn-python/app/templates/airports.html

41 wiersze
1.0 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="container">
<div class="panel panel-success">
<div class="panel-heading"><h3 class="panel-title">Airports</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>
</div>
</form>
<table class="datatable table table-striped table-bordered">
<tr>
<th>#</th>
<th>Country</th>
<th>Name</th>
<th>Logbook (takeoff and landings)</th>
</tr>
{% for airport in airports %}
<tr>
<td>{{ loop.index }}
<td>{{ sel_country|to_html_flag|safe }}</td>
<td>{{ airport|to_html_link|safe }}</td>
<td><a href="{{ url_for('main.logbooks', country=sel_country, airport_id=airport.id) }}">Logbook</a></td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endblock %}