Domains: Fetch list of domains from database

This commit is contained in:
Lexi / Zoe 2021-07-30 01:50:36 +02:00
parent b890432e5b
commit d5789fdedf
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
7 changed files with 98 additions and 11 deletions

View file

@ -5,6 +5,20 @@
{% block content %}
<h2>Domains</h2>
<p>List of domains ... <b>TODO</b></p>
<p><a href="/domains/42">Test</a></p>
<p>This is a list of all domains auto-generated from the existing mail accounts and aliases. As such it is read-only.</p>
<table>
<tr>
<th style="min-width: 12em">Domain</th>
<th>Accounts</th>
<th>Aliases</th>
</tr>
{% for domain, domainCounts in domainList -%}
<tr>
<td><a href="/accounts?domain={{ domain | escape('url') }}">{{ domain }}</a></td>
<td>{{ domainCounts['accounts'] }}</td>
<td>{{ domainCounts['aliases'] }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}