diff --git a/musician/models.py b/musician/models.py index a470a65..9742f8c 100644 --- a/musician/models.py +++ b/musician/models.py @@ -231,7 +231,12 @@ class Address(OrchestraModel): verbose_name = _('Mail addresses') description = _('Description details for mail addresses page.') fields = ('mail_address', 'aliases', 'type', 'type_detail') - param_defaults = {"id": None,} + param_defaults = { + "id": None, + "domain": None, + "mailboxes": [], + "forward": None, + } FORWARD = 'forward' MAILBOX = 'mailbox' diff --git a/musician/templates/musician/addresses.html b/musician/templates/musician/addresses.html index 3c2e6f5..5c0c757 100644 --- a/musician/templates/musician/addresses.html +++ b/musician/templates/musician/addresses.html @@ -6,31 +6,29 @@
{% trans "Mail address" %} | -{% trans "Aliases" %} | -{% trans "Type" %} | -{% trans "Type details" %} | +{% trans "Email" %} | +{% trans "Domain" %} | +{% trans "Mailboxes" %} | +{% trans "Forward" %} |
---|---|---|---|---|---|---|---|
{{ obj.mail_address }} | -{{ obj.aliases|join:" , " }} | -{{ obj.type|capfirst }} | +{{ obj.domain.name }} | - {% if obj.type == 'mailbox' %} - {% include "musician/components/usage_progress_bar.html" with detail=obj.type_detail %} - {% else %} - {{ obj.type_detail }} - {% endif %} + {% for mailbox in obj.mailboxes %} + {{ mailbox.name }} + {% endfor %} | +{{ obj.forward }} |