{% load i18n %}
{% if rank %}
    <table class="table table-condensed table-striped table-hover">
        <tr>
            <th>{% trans 'Count' %}</th>
            <th>{% trans 'Driver' %}</th>
            <th>{% trans 'Team' %}</th>
            {% if rank_opt == 'seasons' %}
                <th>{% trans 'Season' %}</th>
            {% endif %}
        </tr>
        {% for entry in rank %}
            <tr>
                <td>{{ entry.stat }}</td>
                {% with driver=entry.driver %}
                    <td>
                        <i class="flag2x {{ driver.country.flag_css }}"></i>
                        <a
                            href="{{ driver.get_absolute_url }}">{{ driver }}</a>
                    </td>
                {% endwith %}
                <td>{{ entry.teams }}</td>
                {% if rank_opt == 'seasons' %}
                    <td>{{ entry.season }}</td>
                {% endif %}
            </tr>
        {% endfor %}

    </table>
{% endif %}