{% extends "app.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}

{% load i18n %}
{% load extras %}

{% block subsubmenu %}
  <a class="btn btn-default" role="button" href="/rspamd/">
    {% trans "Manage Spam" %}
    {% icon 'external-link' %}
  </a>
  <a class="btn btn-default" role="button"
     href="{% url 'email:aliases' %}">
    {% trans "Manage Aliases" %}
  </a>
{% endblock %}

{% block extra_content %}
  <h3>{% trans "Domains" %}</h3>

  <p>
    {% blocktrans trimmed %}
      The following domains are configured. View details to see the list of DNS
      entries to be made for the domain.
    {% endblocktrans %}
  </p>

  <div class="row">
    <div class="col-md-6">
      <div class="list-group">
        {% for domain in all_domains %}
          <div class="list-group-item">
            <a href="{% url 'email:dns' domain %}"
               title="{% blocktrans %}View domain: {{ domain }}{% endblocktrans %}">
              {{ domain }}</a>
            {% if domain == primary_domain %}{% icon 'tag' %}{% endif %}
          </div>
        {% endfor %}
      </div>
    </div>
  </div>

{% endblock %}
