{# @total: number of total entries. @entries: all entries. @listname: [whitelist, blacklist] @listcategory: category of policyd whitelist/blacklist. [ip, sender] @cur_page: current page number (The same as offset in SQL query). #} {% extends "layout.html" %} {% from "macros/general.html" import show_pages, with context %} {% from "macros/msgHandlers.html" import policydMsgHandler, with context %} {% if listname == 'whitelist' %} {% set listnameStr = _('Whitelist') %} {% elif listname == 'blacklist' %} {% set listnameStr = _('Blacklist') %} {% endif %} {% block title %}{{ listnameStr }}{% endblock %} {% block navlinks_active_system %}class="active"{% endblock %} {% block main %} {# Show system message #} {{ policydMsgHandler(msg) }} {% set navlinks = [ ('ip', _('IP Addresses'), []), ('sender', _('Sender'), []), ('dnsname', _('DNS Name'), []), ('helo', _('HELO Identities'), [listname == 'blacklist',]), ] %}
{# Show categories of white-/blacklist #} {% if listname == 'whitelist' %}

{{ _('Whitelists') }}

{% elif listname == 'blacklist' %}

{{ _('Blacklists') }}

{% endif %}
{# .box-header #} {# List all whitelist under control. #}
{% for i in entries %} {% if listname == 'whitelist' %} {% set record = i._whitelist %} {% elif listname == 'blacklist' %} {% if listcategory != 'helo' %} {% set record = i._blacklist %} {% else %} {% set record = i._helo %} {% endif %} {% endif %} {% if listcategory == 'ip' or listcategory == 'ip' %} {% set ip1, ip2, ip3, ip4 = record.split('.') %} {% endif %} {# #} {% endfor %}
{{ listnameStr }} {{ _('Description') }} {{ _('Expired Date') }}
{{record}} {{ record }} {% if i._description is not sameas none %}{{i._description}}{% endif %} {{ i.expired }}
{# .tab-footer #}
{# .box-body #}
{# .content-box #} {% endblock main %}