{# maillists, [msg,] #} {% extends "layout.html" %} {% from "macros/general.html" import display_subnav, set_account_status_img, display_maillist_restrictions, highlight_username_in_mail, nav_links_of_account_types, show_pages, with context %} {% from "macros/msgHandlers.html" import maillistMsgHandler with context %} {% block title %}{{ _('Mail Lists') }}{% endblock %} {% block navlinks_active_domains %}class="active"{% endblock %} {% block breadcrumb %} {% set crumbs = [ (ctx.homepath + '/domains', _('All domains'),), (ctx.homepath + '/profile/domain/general/' + cur_domain, cur_domain,), (ctx.homepath + '/users/' + cur_domain, _('Users'),), (None, _('Mail Lists'),), (ctx.homepath + '/aliases/' + cur_domain, _('Aliases'),), ] %} {{ display_subnav(crumbs) }} {% endblock %} {% block main %} {# Show system message #} {{ maillistMsgHandler(msg) }} {% if maillists is defined %}

{{ _('Mail lists under domain: %s') |format(cur_domain) }} {% if total is defined and maillists|length > 0 %} ({{ (cur_page-1) * session['pageSizeLimit'] + 1 }}-{{ (cur_page-1) * session['pageSizeLimit'] + maillists|length}}/{{total}}) {% endif %}

{# -- box-header -- #} {# List all mail lists. #}
{# List group attributes/avalues. #} {% if total > 0 %} {% for i in maillists %} {% set entries = i[1] %} {% set cn = entries.get('cn', [''])[0].decode('utf-8') %} {% set mail = entries.get('mail')[0] %} {% set accountStatus = entries.get('accountStatus', ['disabled'])[0] %} {# If not present, set to 'disabled'. #} {% set accessPolicy = entries.get('accessPolicy', ['public'])[0] %} {% set timestamp = entries.get('createTimestamp', ['--------------'])[0] %} {% endfor %} {% else %} {% endif %}
{{ _('Display Name') }} {{ _('Mail Address') }} {{ _('Mail Deliver Restriction') }} {{ _('Created') }}
{{ set_account_status_img(accountStatus) }} {{ cn |cutString }} {{ highlight_username_in_mail(mail) }} {{ display_maillist_restrictions(policy=accessPolicy, maillist_email=mail) }} {{ timestamp |setDatetimeFormat(hour=False) }}
{{ _('No mail list available.') }} {{ _('Add one') }}?
{# -- box-body -- #}
{# -- content-body -- #} {% endif %} {% endblock main %} {% block js %} {{ load_jquery(['tablesorter'], sortFirstCol=false) }} {% endblock js %}