{% extends 'base.html' %}
{% load champion_filter i18n %}

{% block menu %}
    {% include 'driver27/competition/menu-pre.html' %}
    {% include 'driver27/competition/menu.html' %}
{% endblock %}

{% block 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-4">{% trans 'Driver leader' %}</th>
            <th class="col-md-6">{% trans 'Team leader' %}</th>
        </tr>

        <tr id="seasons-list"></tr>
    </table>


{% endblock %}

{% block extra_script %}
    {{ block.super }}
    <script type="text/javascript">

        $('.loader-lock').removeClass('hide');
        $.get("{% url 'driver27:global:tpl' %}", {'competition': "{{ competition.pk }}"},
            function (data) {
                $('#seasons-list').replaceWith(data);
                $('.loader-lock').addClass('hide');
            }
        )
        ;

    </script>
{% endblock %}