mail-account-admin/templates/account_details.html.twig

83 lines
2.5 KiB
Twig

{% extends "base.html.twig" %}
{% block title %}Accounts{% endblock %}
{% block content %}
<h2>Account: {{ accountUsername }}</h2>
<p>
<b>Actions:</b>
<a href="/accounts/{{ id }}/edit">Edit</a> |
<a href="/accounts/{{ id }}/delete">Delete</a> |
<a href="mailto:{{ accountUsername }}">Send mail</a>
</p>
<table class="vertical_table_headers">
<tr>
<th style="min-width: 10em">User ID</th>
<td style="min-width: 20em">{{ accountData['user_id'] }}</td>
</tr>
<tr>
<th>Username</th>
<td>{{ accountData['username'] }}</td>
</tr>
<tr>
<th>Domain</th>
<td><a href="/accounts?domain={{ accountData['domain'] | escape('url') }}">{{ accountData['domain'] }}</a></td>
</tr>
<tr>
<th>Password</th>
<td>
{% if passwordHashType == 'empty' %}
<span class="red">[No password set]</span>
{% elseif passwordHashType == 'unknown' %}
<span class="red">[Not hashed / unknown hash algorithm]</span>
{% else %}
<span class="gray">[{{ passwordHashType }} hash]</span>
{% endif %}
</td>
</tr>
<tr>
<th>Status</th>
<td>{{ accountData['is_active'] == '1' ? '<span class="green">Active</span>' : '<span class="red">Inactive</span>' }}</td>
</tr>
<tr>
<th>Home directory</th>
<td><span class="gray">/srv/vmail/</span>{{ accountData['home_dir'] }}</td>
</tr>
<tr>
<th>Admin memo</th>
<td>{{ accountData['memo'] | nl2br }}</td>
</tr>
<tr>
<th>Created at</th>
<td>{{ accountData['created_at'] }}</td>
</tr>
<tr>
<th>Last modified at</th>
<td>{{ accountData['modified_at'] }}</td>
</tr>
</table>
<h3>Aliases</h3>
{% if aliases %}
<table>
<tr>
<th>Address</th>
<th>Created at</th>
<th>Actions</th>
</tr>
{% for alias in aliases %}
<tr>
<td>{{ alias['mail_address'] }}</td>
<td>{{ alias['created_at'] }}</td>
<td><a href="#">Delete</a></td> {# TODO #}
</tr>
{% endfor %}
</table>
{% else %}
<p>No aliases.</p>
{% endif %}
{% endblock %}