sipa/templates/bustimes.html

Summary

Maintainability
Test Coverage
{% extends "base.html" %}
{% set page_title = _('Abfahrtszeiten') %}

{% block content %}
    {% include "heading.html" %}
    {% if stops %}
        <div class="row">
            <div class="col-md-5">
                {% for stop in stops %}
                    <h3>{{ _('Haltestelle') }} {{ stop }}</h3>
                    {% if not stops[stop] %}
                        <div class="text-danger">{{ _('Fehler bei der Abfrage!') }}</div>
                    {% else %}
                        <table id="timetable" class="table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <th class="col-md-1">{{ _('Linie') }}</th>
                                    <th class="col-md-3">{{ _('Richtung') }}</th>
                                    <th class="col-md-1">in</th>
                                </tr>
                            </thead>
                            <tbody>
                                {% for i in stops[stop] %}
                                    <tr>
                                        <td>{{ i.line }}</td>
                                        <td>{{ i.dest }}</td>
                                        <td{% if i.minutes_left < 6 %} class="bus_few_minutes_left text-danger"{% endif %}>{{ i.minutes_left }} Min</td>
                                    </tr>
                                {% endfor %}
                            </tbody>
                        </table>
                    {% endif %}
                {% endfor %}
                {{ _('Quelle') }}: <a href="http://www.vvo-online.de/">vvo-online.de</a> Abfahrtsmonitor Widget.
            </div>
        </div>
    {% else %}
        <div class="text-danger">{{ _('Fehler bei der Abfrage!') }}</div>
    {% endif %}

{% endblock %}