86 lines
2.6 KiB
Twig
86 lines
2.6 KiB
Twig
{% extends "base.html.twig" %}
|
|
|
|
{% block title %}View account{% endblock %}
|
|
|
|
{% block content %}
|
|
<h2>Account: {{ accountUsername }}</h2>
|
|
|
|
<p>
|
|
<b>Actions:</b>
|
|
<span>View</span> |
|
|
<a href="/accounts/{{ id }}/edit">Edit</a> |
|
|
<a href="/accounts/{{ id }}/delete">Delete</a> |
|
|
<a href="mailto:{{ accountUsername }}">Send mail</a>
|
|
</p>
|
|
|
|
<h3>View account details</h3>
|
|
|
|
<table class="bordered_table vertical_table_headers">
|
|
<tr>
|
|
<th style="min-width: 10em">User ID</th>
|
|
<td style="min-width: 20em">{{ account.getId() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Username</th>
|
|
<td>{{ account.getUsername() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Domain</th>
|
|
<td><a href="/accounts?domain={{ account.getDomain() | escape('url') }}">{{ account.getDomain() }}</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>{{ account.isActive() ? '<span class="green">Active</span>' : '<span class="red">Inactive</span>' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Home directory</th>
|
|
<td><span class="gray">/srv/vmail/</span>{{ account.getHomeDir() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Admin memo</th>
|
|
<td>{{ account.getMemo() | nl2br }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Created at</th>
|
|
<td>{{ account.getCreatedAt() | date }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Last modified at</th>
|
|
<td>{{ account.getModifiedAt() | date }}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h3>Aliases</h3>
|
|
|
|
{% if aliases %}
|
|
<table class="bordered_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 %}
|