{% load i18n %}
{% get_available_languages as LANGUAGES %}

<table class="table table-hover">
    <thead>
        <tr>
            <th>{% trans "Language" %}</th>
            <th>{% trans "Progression" %}</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        {% for item in data %}
            <tr>
                <td><img class="flag" src="{{ STATIC_URL }}common/flags/{{ item.language.0 }}.png" /> {{ item.language.1 }}</td>
                <td>
                    <div class="progress">
                        <div class="progress-bar progress-bar-{% if item.translation.progression >= 75 %}success{% elif item.translation.progression >= 25 %}warning{% else %}danger{% endif %} progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: {{ item.translation.progression }}%;">
                            {{ item.translation.progression }}%
                        </div>
                    </div>
                </td>
                <td align="left">
                    <a class="btn btn-xs btn-primary" href="{% url path_export item.language.0 %}">{% trans "Export" %}</a>
                    <a class="btn btn-xs btn-warning" href="{% url path_import item.language.0 %}">{% trans "Import" %}</a>
                    <small>
                    {% if item.translation.last_modified != None %}
                        {% blocktrans with date=item.translation.last_modified|date %}Last translation : {{ date }} {% endblocktrans %}
                    {% endif %}
                    </small>
                </td>
            </tr>
        {% endfor %}
    </tbody>
</table>
