{% extends 'driver27/base.html' %}
{% load i18n %}
{% block dr27_menu %}
    {% include 'driver27/season/season-menu-pre.html' %}
    <li class="nav-item">
        <a class="nav-link" href="{% url 'season-race-list' season.competition.slug season.year %}">{%  trans 'Races' %}</a>
    </li>
{% endblock %}
{% block dr27_content %}
    {{ block.super }}
    <table class="table">
    <tr>
        <th>{%  trans 'Round' %}</th>
        <th>{%  trans 'Date' %}</th>
        <th>{%  trans 'Grand Prix' %}</th>
        <th>{%  trans 'Circuit' %}</th>
        <th>{%  trans 'Winner' %}</th>
        <th>{%  trans 'Winner team' %}</th>
    </tr>
    {% for race in races %}
        <tr>
            <td><a href="{% url 'season-race-view' season.competition.slug season.year race.round %}">{{ race.round }}</a></td>
            <td>{{ race.date }}</td>
            <td>{{ race.grand_prix }}</td>
            <td>{{ race.circuit }}</td>
            <td>{{ race.winner.contender.driver }}</td>
            <td>{{ race.winner.team }}</td>
        </tr>
    {% endfor %}

    </table>

{% endblock %}
