Source

voosonline / src / templates / panel.html

{% extends "base.html" %}

{% block backbutton %}
    <a href="/{{ airport.iata_code }}/" data-rel="back" data-role="button" data-icon="arrow-l">Voltar</a>
{% endblock %}

{% block header %}
    {% if departure %}
        Partidas (decolagens)
    {% else %}
        Chegadas (pousos)
    {% endif %} em {{ airport.infraero_name }} ({{ airport.iata_code }})
{% endblock %}

{% block contents %}
    <table class="panel">
        <thead>
            <tr>
                <th>Companhia</th>
                <th>Voo</th>
                <th>Previsto</th>
                <th>Confirmado</th>
                <th>{% if departure %}Destino{% else %}Origem{% endif %}</th>
                <th>Status</th>
            </tr>
        </thead>
        <tbody>
            {% if events %}
                {% for event in events %}
                    <tr>
                        <td>{{ event.company.name }}</td>
                        <td>{{ event.flight_number|floatformat }}</td>
                        <td>{{ event.estimation|time:"H:i" }}</td>
                        <td>{{ event.confirmed|time:"H:i" }}</td>
                        <td class="airport">
                            {% if departure %}
                                {{ event.destination.infraero_name }}
                            {% else %}
                                {{ event.source.infraero_name }}
                            {% endif %}
                        </td>                        
                        <td class="status">{{ event.status }}</td>
                    </tr>
                {% endfor %}
            {% else %}
                <tr>
                    <td colspan="6">Nenhum voo encontrado</td>
                </tr>
            {% endif %}
        </tbody>
    </table>
    
{% endblock %}

{% block footer %}
    <div data-role="footer" data-position="fixed" data-id="myfooter">
        <div class="ui-bar">
            <a href="/{{ airport.iata_code }}/{% if departure %}partidas{% else %}chegadas{% endif %}/"
                data-role="button" data-icon="refresh" rel="external">Atualizar</a>                              
            <h4>
                Dados da 
                    <a href="http://www.infraero.gov.br/voos/index.aspx" 
                       rel="nofollow"
                       rel="external">infraero</a>
                de {{ airport.infraero_last_timestamp|time:"H\hi" }}
            </h4>
        </div>
    </div>
{% endblock %}