{% extends "layout.html" %} {% from "macros/form_inputs.html" import input_csrf_token with context %} {% from "macros/general.html" import display_subnav, set_account_status_img, set_user_admin_type_img, highlight_username_in_mail, display_progress_bar, display_filter_by_first_char, display_remove_mailbox_days, show_pages with context %} {% from "macros/msg_handlers.html" import user_msg_handler with context %} {% block title %}{{ _('Mail Users') }}{% endblock %} {% block navlinks_domains %}class="active"{% endblock %} {% block breadcrumb %} {% set crumbs = [ (ctx.homepath + '/domains', _('All domains')), (ctx.homepath + '/profile/domain/general/' + cur_domain, cur_domain), ('active', ctx.homepath + '/users/' + cur_domain, _('Users')), ] %} {{ display_subnav(crumbs) }} {% endblock %} {% block main %} {# Show system message #} {{ user_msg_handler(msg) }} {% if users is defined %} {% if users or (not users and first_char) %} {{ display_filter_by_first_char(baseurl=ctx.homepath + '/users/' + cur_domain, available_chars=all_first_chars, first_char=first_char, disabled_only=disabled_only) }} {% endif %} {# List all users. #}

{{ _('Users under domain: %s') |format(cur_domain) }} {% if total is defined and users|length > 0 %} ({{ (cur_page-1) * page_size_limit + 1 }}-{{ (cur_page-1) * page_size_limit + users|length}}/{{ total }}) {% endif %}

{{ input_csrf_token() }} {% if users %} {% for (dn, entries) in users %} {% set mail = entries.get('mail')[0] |string |e %} {% set cn = entries.get('cn', [''])[0] |e %} {% set employeeid = entries.get('employeeNumber', [''])[0] |e %} {% set jobTitle = entries.get('title', [''])[0] |e %} {# If accountStatus is not present, mark as 'disabled'. #} {% set accountStatus = entries.get('accountStatus', ['disabled'])[0] |e %} {% set mailQuota = entries.get('mailQuota', ['0'])[0] |e %} {% set shadowLastChange = entries.get('shadowLastChange', [''])[0] |e %} {% set user_is_global_admin = False %} {% if entries.get('domainGlobalAdmin', ['no'])[0] == 'yes' %} {% set user_is_global_admin = True %} {% endif %} {# mail quota #} {% set _used_quota = used_quotas.get(mail, {}).get('bytes', 0) %} {% if mailQuota == '0' %} {% if session.get('show_used_quota') %} {% else %} {% endif %} {% else %} {% if session.get('show_used_quota') %} {% set percent = _used_quota |convert_to_percentage(mailQuota) %} {% else %} {% endif %} {% endif %} {% endfor %} {% else %} {% endif %}
{{ _('Display Name') }} {{ _('Mail Address') }} {{ _('User/Employee ID') }} {{ _('Job Title') }} {{ _('Quota') }}
{{ set_account_status_img(accountStatus) }} {% if entries.get('domainGlobalAdmin', ['no'])[0] == 'yes' %} {{ set_user_admin_type_img('globaladmin') }} {% else %} {% if 'domainadmin' in entries.get('enabledService', []) %} {{ set_user_admin_type_img('domainadmin') }} {% endif %} {% endif %} {{ cn |cut_string }} {{ highlight_username_in_mail(mail) }} {{ employeeid }} {{ jobTitle }}{{ _used_quota |file_size_format }} / {{ _('Unlimited') }}{{ _('Unlimited') }} {{ display_progress_bar(percent, tooltip='', show_zero=true, width='60%', style='thin') }} {{ mailQuota |file_size_format }}
{{ _('No mail user available.') }} {% if not (first_char or disabled_only) %} {{ _('Add one') }}? {% endif %}
{% if users%} {% endif %}
{# #user_list #}
{# box-body #}
{# content-box #} {% endif %} {% endblock main %}