django-musician/musician/templates/musician/mail.html
2019-12-04 11:45:09 +01:00

49 lines
1.7 KiB
HTML

{% extends "musician/base.html" %}
{% load i18n %}
{% block content %}
<h1 class="service-name">{{ service.verbose_name }}</h1>
<p class="service-description">{{ service.description }}</p>
<table class="table service-list">
<colgroup>
<col span="1" style="width: 25%;">
<col span="1" style="width: 50%;">
<col span="1" style="width: 5%;">
<col span="1" style="width: 20%;">
</colgroup>
<thead class="thead-dark">
<tr>
<th scope="col">{% trans "Mail address" %}</th>
<th scope="col">{% trans "Aliases" %}</th>
<th scope="col">{% trans "Type" %}</th>
<th scope="col">{% trans "Type details" %}</th>
</tr>
</thead>
<tbody>
{% for obj in object_list %}
<tr>
<td>{{ obj.mail_address }}</td>
<td>{{ obj.aliases|join:" , " }}</td>
<td>{{ obj.type|capfirst }}</td>
<td>
{% if obj.type == 'mailbox' %}
{% with obj.type_detail as detail %}
<div class="text-center">
{{ detail.usage }} of {{ detail.total }}{{ detail.unit }}
</div>
<div class="progress">
<div class="progress-bar bg-secondary w-{{ detail.percent }}" role="progressbar" aria-valuenow="{{ detail.usage }}" aria-valuemin="0" aria-valuemax="{{ detail.total }}"></div>
</div>
{% endwith %}
{% else %}
{{ obj.type_detail }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
{% include "musician/components/table_paginator.html" %}
</table>
{% endblock %}