{% extends "admin/change_list.html" %}
{% load i18n static admin_list %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:dbtranslate_list' %}">Translations</a>
&rsaquo; {{ locale.fullname }}
</div>
{% endblock %}

{% block content %}
<div id="content-main">
    {% if formset and formset.errors %}
    <p class="errornote">
    {% blocktranslate count counter=formset.total_error_count %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
    </p>
    {{ formset.non_form_errors }}
    {% endif %}
    <div class="module" id="changelist">
        <div class="changelist-form-container">
            <div>
                <form id="changelist-form" method="post" novalidate>{% csrf_token %}
                    {% if formset %}
                    <div>{{ formset.management_form }}</div>
                    {% endif %}

                    {% block result_list %}
                    <div class="results">
                        <table id="result_list">
                            <thead>
                                <tr>
                                    <td>English</td>
                                    <td>{{ locale.fullname }}</td>
                                </tr>
                            </thead>
                            <tbody>
                            {% for form in formset %}
                                {% if form and form.non_field_errors %}
                                <tr><td colspan="2">{{ form.non_field_errors }}</td></tr>
                                {% endif %}
                                <tr class="real">
                                    {{ form.id }}
                                    <td>{{ form.raw_string.value }}</td>
                                    <td>{{ form.translated }}</td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                    {% if action_form and actions_on_bottom and show_admin_actions %}{% admin_actions %}{% endif %}
                    {% endblock %}
                    <div class="changelist-footer">
                        {% if formset %}<input type="submit" name="_save" class="default" value="{% translate 'Save' %}">{% endif %}
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}
