2020-07-27 16:02:09 +02:00
|
|
|
{% extends 'layouts/base.njk' %}
|
|
|
|
|
|
|
|
{% set title = app.name + ' - Backend' %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<div class="container">
|
2020-07-30 11:07:31 +02:00
|
|
|
{{ macros.breadcrumb('Mailboxes', [
|
|
|
|
{title: 'Backend', link: route('backend')}
|
|
|
|
]) }}
|
|
|
|
|
|
|
|
<h1>Mailbox manager</h1>
|
|
|
|
|
2020-07-27 16:02:09 +02:00
|
|
|
<section class="panel">
|
2020-07-30 11:20:31 +02:00
|
|
|
<h2><i data-feather="globe"></i> Domains</h2>
|
2020-07-27 16:02:09 +02:00
|
|
|
|
|
|
|
<form action="{{ route('backend-add-domain') }}" method="POST" class="sub-panel">
|
|
|
|
<h3>Add domain</h3>
|
|
|
|
{{ macros.field(_locals, 'text', 'name', null, 'Domain name', null, 'required') }}
|
|
|
|
|
|
|
|
{{ macros.field(_locals, 'select', 'user_id', undefined, 'Owner', null, 'required', users) }}
|
|
|
|
|
|
|
|
<button><i data-feather="plus"></i> Add domain</button>
|
|
|
|
|
|
|
|
{{ macros.csrf(getCSRFToken) }}
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<table class="data-table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>#</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Owner</th>
|
|
|
|
<th>Identities</th>
|
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
{% for domain in domains %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ domain.id }}</td>
|
|
|
|
<td>{{ domain.name }}</td>
|
|
|
|
<td>{{ domain.owner_name | default('Public') }}</td>
|
|
|
|
<td>{{ domain.identity_count }}</td>
|
|
|
|
<td class="actions">
|
2020-07-30 10:58:51 +02:00
|
|
|
<a href="{{ route('backend-edit-domain', domain.id) }}" class="button">
|
|
|
|
<i data-feather="edit-2"></i> <span class="tip">Edit</span>
|
|
|
|
</a>
|
|
|
|
|
2020-07-27 16:02:09 +02:00
|
|
|
<form action="{{ route('backend-remove-domain') }}" method="POST">
|
|
|
|
<input type="hidden" name="id" value="{{ domain.id }}">
|
|
|
|
|
2020-07-30 10:58:18 +02:00
|
|
|
<button class="danger"
|
|
|
|
onclick="return confirm('Are you sure you want to delete {{ domain.name }}?')">
|
|
|
|
<i data-feather="trash"></i> <span class="tip">Remove</span>
|
2020-07-27 16:02:09 +02:00
|
|
|
</button>
|
|
|
|
|
|
|
|
{{ macros.csrf(getCSRFToken) }}
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="panel">
|
2020-07-30 11:20:31 +02:00
|
|
|
<h2><i data-feather="mail"></i> Mailboxes</h2>
|
2020-07-27 16:02:09 +02:00
|
|
|
|
|
|
|
<table class="data-table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>#</th>
|
|
|
|
<th>User name</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Identities</th>
|
|
|
|
<th>Owned domains</th>
|
2020-07-30 11:20:31 +02:00
|
|
|
<th>Actions</th>
|
2020-07-27 16:02:09 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
{% for box in mailboxes %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ box.id }}</td>
|
|
|
|
<td>{{ box.username }}</td>
|
2020-07-30 11:20:31 +02:00
|
|
|
<td>{{ box.name }}</td>
|
2020-07-27 16:02:09 +02:00
|
|
|
<td>{{ box.identity_count }}</td>
|
|
|
|
<td>{{ box.domain_count }}</td>
|
2020-07-30 11:20:31 +02:00
|
|
|
<td class="actions">
|
|
|
|
<a href="{{ route('backend-mailbox', box.id) }}" class="button">
|
|
|
|
<i data-feather="edit-2"></i> <span class="tip">Edit</span>
|
|
|
|
</a>
|
|
|
|
</td>
|
2020-07-27 16:02:09 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|