{% extends "admin/base_main.html" %}

{% block subtitle %}Domains{% endblock %}

{% block settings_content %}
    <div class="view-options">
        <span class="spacer"></span>
        <a href="{% url "admin_domains_create" %}" class="button"><i class="fa-solid fa-plus"></i> Add Domain</a>
    </div>
    <table class="items">
        {% for domain in domains %}
            <tr>
                <td class="icon">
                    <a href="{{ domain.urls.edit }}" class="overlay"></a>
                    <i class="fa-solid fa-globe"></i>
                </td>
                <td class="name">
                    <a href="{{ domain.urls.edit }}" class="overlay"></a>
                    {{ domain.domain }}
                    <small>
                        {% if domain.service_domain %}{{ domain.service_domain }}{% endif %}
                    </small>
                </td>
                <td class="stat">
                    {% if domain.public %}Public{% else %}Private{% endif %}
                    {% if domain.default %}(Default){% endif %}
                </td>
            </tr>
        {% empty %}
            <tr class="empty"><td>You have no domains set up.</td></tr>
        {% endfor %}
    </table>
{% endblock %}
