{% extends 'admin/master.html' %} {% macro show_user(user) -%}

User {{ user.email }} with ID {{ user.id }}.

User ID Email Paid Subscription Created At
{{ user.id }} {{ user.email }} {{ "yes" if user.is_paid() else No }} {{ user.get_active_subscription() }} {{ user.created_at }}
{%- endmacro %} {% macro list_mailboxes(mbox_count, mboxes) %}

{{ mbox_count }} Mailboxes found. {% if mbox_count>10 %}Showing only the first 10.{% endif %}

{% for mailbox in mboxes %} {% endfor %}
Mailbox ID Email Verified Created At
{{ mailbox.id }} {{ mailbox.email }} {{ "Yes" if mailbox.verified else "No" }} {{ mailbox.created_at }}
{% endmacro %} {% macro list_alias(alias_count, aliases) %}

{{ alias_count }} Aliases found. {% if alias_count>10 %}Showing only the first 10.{% endif %}

{% for alias in aliases %} {% endfor %}
Alias ID Email Verified Created At
{{ alias.id }} {{ alias.email }} {{ "Yes" if alias.verified else "No" }} {{ alias.created_at }}
{% endmacro %} {% macro show_deleted_alias(deleted_alias) -%}

Deleted Alias {{ deleted_alias.email }} with ID {{ deleted_alias.id }}.

Deleted Alias ID Email Deleted At Reason
{{ deleted_alias.id }} {{ deleted_alias.email }} {{ deleted_alias.created_at }} {{ deleted_alias.reason }}
{%- endmacro %} {% macro show_domain_deleted_alias(dom_deleted_alias) -%}

Domain Deleted Alias {{ dom_deleted_alias.email }} with ID {{ dom_deleted_alias.id }} for domain {{ dom_deleted_alias.domain.domain }}

Deleted Alias ID Email Domain Domain ID Domain owner user ID Domain owner user email Deleted At
{{ dom_deleted_alias.id }} {{ dom_deleted_alias.email }} {{ dom_deleted_alias.domain.domain }} {{ dom_deleted_alias.domain.id }} {{ dom_deleted_alias.domain.user_id }} {{ dom_deleted_alias.created_at }}
{{ show_user(data.domain_deleted_alias.domain.user) }} {%- endmacro %} {% block body %}
{% if no_match %} {% endif %} {% if data.alias %}

Found Alias {{ data.alias.email }}

{{ list_alias(1,[data.alias]) }} {{ show_user(data.alias.user) }} {{ list_mailboxes(helper.mailbox_count(data.alias.user), helper.mailbox_list(data.alias.user) ) }}
{% endif %} {% if data.user %}

Found User {{ data.user.email }}

{{ show_user(data.user) }} {{ list_mailboxes(helper.mailbox_count(data.user), helper.mailbox_list(data.user) ) }} {{ list_alias(helper.alias_count(data.user),helper.alias_list(data.user)) }}
{% endif %} {% if data.mailbox %}

Found Mailbox {{ data.mailbox.email }}

{{ list_mailboxes(1, [data.mailbox] ) }} {{ show_user(data.mailbox.user) }}
{% endif %} {% if data.deleted_alias %}

Found DeletedAlias {{ data.deleted_alias.email }}

{{ show_deleted_alias(data.deleted_alias) }}
{% endif %} {% if data.domain_deleted_alias %}

Found DomainDeletedAlias {{ data.domain_deleted_alias.email }}

{{ show_domain_deleted_alias(data.domain_deleted_alias) }}
{% endif %} {% endblock %}