{% extends postorius_base_template %}
{% load i18n %}

{% block subtitle %}
{% trans 'Domains' %}
{% endblock %}

{% block main %}

    <div class="page-header">
        <h1>{% trans 'Domains' %}</h1>
    </div>

    <p class="text-right"><a class="btn btn-success" href="{% url 'domain_new' %}">{% trans 'Add Domain' %}</a></p>

    <div class="table-responsive">
        <table class="table table-bordered table-striped">
            <thead>
                <tr>
                    <th>{% trans 'Mail Host' %}</th>
                    <th>{% trans 'URL Host' %}</th>
                    <th>{% trans 'Description' %}</th>
                    <th>&nbsp;</th>
                </tr>
            </thead>
            <tbody>
                {% for domain in domains %}
                    <tr>
                        <td>{{ domain.mail_host }}</td>
                        <td>{{ domain.base_url }}</td>
                        <td>{{ domain.description }}</td>
                        <td><a href="{% url 'domain_delete' domain.mail_host %}" class="btn btn-xs btn-danger">{% trans 'Delete' %}</a></td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>

{% endblock main %}
