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

53 lines
2.1 KiB
Twig

{% extends "base.html.twig" %}
{% block title %}Accounts{% endblock %}
{% block content %}
<h2>Accounts</h2>
<p>List of all mail accounts.</p>
<div class="filter_options">
<form action="/accounts" method="GET">
<h4>Filter:</h4>
<label for="filter_domain">Domain: </label>
<input name="domain" id="filter_domain" value="{{ filterDomain | default('') }}"/>
<button type="submit">Apply</button>
<button type="reset" onclick="location.href='/accounts'">Clear</button>
</form>
</div>
<input type="checkbox" id="show_details_checkbox"><label for="show_details_checkbox"> Show detail columns</label>
<table>
<tr>
<th style="min-width: 15em">Username</th>
<th style="min-width: 10em">Domain</th>
<th>Aliases</th>
<th>Active</th>
<th class="detail_column">Home directory</th>
<th class="detail_column" style="min-width: 10em">Memo</th>
<th>Created</th>
<th class="detail_column">Last modified</th>
</tr>
{% if accountList %}
{% for account in accountList -%}
<tr{% if account['is_active'] != 1 %} class="inactive"{% endif %}>
<td><a href="/accounts/{{ account['user_id'] }}">{{ account['username'] }}</a></td>
<td><a href="/accounts?domain={{ account['domain'] }}">{{ account['domain'] }}</a></td>
<td>{{ account['alias_count'] }}</td>
<td>{{ account['is_active'] == 1 ? 'Yes' : 'No' }}</td>
<td class="detail_column"><span class="gray">vmail/</span>{{ account['home_dir'] }}</td>
<td class="detail_column">{{ account['memo'] }}</td>
<td>{{ account['created_at'] }}</td>
<td class="detail_column">{{ account['modified_at'] }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="100" style="text-align: center">No accounts found.</td>
</tr>
{% endif %}
</table>
{% endblock %}