django-musician/musician/templates/musician/mailboxes.html

49 lines
1.6 KiB
HTML
Raw Normal View History

{% extends "musician/mail_base.html" %}
{% load i18n %}
{% block tabcontent %}
<div class="tab-pane fade show active" id="mailboxes" role="tabpanel" aria-labelledby="mailboxes-tab">
<table class="table service-list">
<colgroup>
<col span="1" style="width: 20%;">
<col span="1" style="width: 10%;">
<col span="1" style="width: 60%;">
<col span="1" style="width: 10%;">
</colgroup>
<thead class="thead-dark">
<tr>
<th scope="col">{% trans "Name" %}</th>
<th scope="col">{% trans "Filtering" %}</th>
<th scope="col">{% trans "Addresses" %}</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
2021-09-27 10:40:52 +00:00
{% for mailbox in object_list %}
{# <!-- Exclude (don't render) inactive mailboxes -->#}
{% if mailbox.is_active %}
<tr>
<td>{{ mailbox.name }}</td>
<td>{{ mailbox.filtering }}</td>
2021-09-27 10:40:52 +00:00
<td>
{% for addr in mailbox.addresses %}
2021-09-27 11:52:27 +00:00
<a href="{% url 'musician:address-update' addr.data.id %}">
2021-09-27 10:40:52 +00:00
{{ addr.data.name }}@{{ addr.data.domain.name }}
</a><br/>
{% endfor %}
</td>
<td>
<a class="btn btn-outline-danger" href="{% url 'musician:mailbox-delete' mailbox.id %}" title="{% trans 'Delete' %}"><i class="fas fa-trash"></i></a>
</td>
</tr>
{% endif %}{# <!-- /is_active --> #}
{% endfor %}
</tbody>
{% include "musician/components/table_paginator.html" %}
2021-10-05 11:10:53 +00:00
</table>
<a class="btn btn-primary mt-4 mb-4" href="{% url 'musician:mailbox-create' %}">{% trans "New mailbox" %}</a>
</div>
{% endblock %}