{% extends 'driver27/base.html' %}
{% load champion_filter i18n %}
{% block dr27_menu %}
    {% include 'driver27/global/global-menu-pre.html' %}
    {% include 'driver27/global/global-menu.html' %}
{% endblock %}
{% block dr27_content %}
    {{ block.super }}

    <table class="table table-condensed table-striped table-hover">
        <tr>
            <th class="col-md-2">{% trans 'Season' %}</th>
            <th class="col-md-2">{% trans 'Competition' %}</th>
            <th class="col-md-1">{% trans 'Year' %}</th>
            <th class="col-md-4">{% trans 'Driver leader' %}</th>
            <th class="col-md-3">{% trans 'Team leader' %}</th>
        </tr>
        {% for season in seasons %}
            <tr>
                <td>
                    <a href="{% url 'dr27-season-view' season.competition.slug season.year %}">
                        {{ season }}
                    </a>
                </td>
                <td>
                    <a href="{% url 'dr27-competition-view' season.competition.slug %}">
                        {{ season.competition }}
                    </a>
                </td>
                <td>
                    {{ season.year }}
                </td>
                <td>
                    {{ season.pk | champion_filter | safe }}
                    {{ season.leader.points }} <a href="{% url 'dr27-profile-view' season.leader.driver.pk %}">{{ season.leader.driver }}</a> ({{ season.leader.teams }})
                </td>
                <td>
                    {{ season.team_leader.points }} <a href="{% url 'dr27-profile-team-view' season.team_leader.team.pk %}">{{ season.team_leader.team }}</a>
                </td>
            </tr>
        {% endfor %}
    </table>
{% endblock %}