Source

iredadmin-ose / templates / default / mysql / domain / list.html

Full commit
Zhang Huangbin 878d625 



Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 





























Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 



Zhang Huangbin 551aed9 

Zhang Huangbin 878d625 
Zhang Huangbin 551aed9 

Zhang Huangbin 878d625 

Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 
Zhang Huangbin 551aed9 





Zhang Huangbin 878d625 
Zhang Huangbin 551aed9 

















Zhang Huangbin 552ea86 
Zhang Huangbin 551aed9 



Zhang Huangbin 0ff63a9 
Zhang Huangbin 551aed9 




Zhang Huangbin 46580e9 
Zhang Huangbin 551aed9 














Zhang Huangbin 878d625 
Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 
Zhang Huangbin 551aed9 

Zhang Huangbin 878d625 
Zhang Huangbin 551aed9 

Zhang Huangbin 878d625 













Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 

Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 






Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 
Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 

Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 
{% extends "layout.html" %}

{% from "macros/general.html" import
        load_jquery,
        display_csrf_token,
        set_account_status_img,
        display_number_of_account_limited,
        display_add_domain,
        show_pages,
        with context
        %}

{% from "macros/msgHandlers.html" import domainMsgHandler, with context %}

{% block title %}{{ _('Domains and Accounts') }}{% endblock %}
{% block navlinks_active_domains %}class="active"{% endblock %}

{% block main %}
{# Show system message #}
{{ domainMsgHandler(msg) }}

{# List all domains under control. #}
    <div class="content-box">
        <div class="box-body">
            <div class="box-header clear">
                <ul class="tabs clear">
                    <li class="active"><a href="{{ctx.homepath}}/domains">{{ _('All domains') }}</a></li>
                    {% if session.get('domainGlobalAdmin') is sameas true %}
                        <li><a href="{{ctx.homepath}}/create/domain"><img src="{{ctx.homepath}}/static/{{skin}}/images/ico_add_12.png" /> {{ _('Add domain') }}</a></li>
                    {% endif %}
                </ul>

                <h2>
                    {{ _('All domains under your control.') }}
                    {% if total is defined and allDomains|length > 0 %}
                        ({{ (cur_page-1) * pageSizeLimit + 1 }}-{{ (cur_page-1) * pageSizeLimit + allDomains|length}}/{{ total }})
                    {% endif %}
                </h2>
            </div>

            <form name="domains" id="list_table" method="post" action="{{ctx.homepath}}/domains">
                {{ display_csrf_token() }}

                <table class="style1 tablesorter" cellspacing="0">
                    <thead>
                        <tr>
                            {% if session.get('domainGlobalAdmin') is sameas true %}
                                <th class="checkbox"><input type="checkbox" class="checkbox select-all" /></th>
                            {% endif %}
                            <th>{{ _('Domain') }}</th>
                            <th>{{ _('Name') }}</th>
                            <th>{{ _('Quota') }}</th>
                            <th>{{ _('Users') }}</th>
                        </tr>
                    </thead>

                    <tbody>
                        {% if allDomains |length > 0 %}
                            {% for r in allDomains %}
                                {% set domain = r.domain |e %}

                                <tr>
                                    {% if session.get('domainGlobalAdmin') is sameas true %}
                                        <td class="checkbox"><input type="checkbox" class="checkbox " name="domainName" value="{{ domain }}" /></td>
                                    {% endif %}

                                    <td class="vcenter">
                                        <a href="{{ctx.homepath}}/profile/domain/general/{{ domain }}"><img src="{{ctx.homepath}}/static/{{skin}}/images/action_edit.png" title="{{ _('Edit account profile') }}" class="fr-space"/></a>
                                        {{ set_account_status_img(r.active) }}
                                        {{ domain }}
                                    </td>
                                    {% if r.description is sameas none %}
                                        <td class="vcenter">&nbsp;</td>
                                    {% else %}
                                        <td class="vcenter">{{ r.description |cut_string |e }}</td>
                                    {% endif %}

                                    {#-- Domain Quota --#}
                                    <td class="vcenter">
                                        <span title="{{ _('Allocated') }}">{{ r.quota_count |filesizeformat(baseMB=True) }}</span><span title="{{ _('Total') }}">{{ display_number_of_account_limited(r.maxquota |filesizeformat(baseMB=True), hide_unlimited=false) }}</span>
                                    </td>

                                    {#-- Users --#}
                                    <td class="vcenter">
                                        {% if r.mailboxes > 0 %}
                                            <a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none;"><span>{% if r.mailbox_count is not sameas none %}{{ r.mailbox_count }}{% else %}0{% endif %} {{ display_number_of_account_limited(r.mailboxes, hide_unlimited=false) }})</span></a>
                                        {% elif r.mailboxes == -1 %}
                                            <span class="grey"><em>{{ _('DISABLED') }}</em></span>
                                        {% else %}
                                            <a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none;"><span>{% if r.mailbox_count is not sameas none %}{{ r.mailbox_count }}{% else %}0{% endif %}</span></a>
                                        {% endif %}
                                    </td>
                                </tr>
                            {% endfor %}
                        {% else %}
                            <tr>
                            {% if session.get('domainGlobalAdmin') is sameas true %}
                                <td class="checkbox"></td>
                                <td class="vcenter" colspan="5">{{ _('No mail domain available.') }}
                                    <a href="{{ctx.homepath}}/create/domain">{{ _('Add one') }}</a>?
                                </td>
                            {% else %}
                                <td class="vcenter" colspan="5">{{ _('No mail domain available.') }}</td>
                            {% endif %}
                            </tr>
                        {% endif %}

                    </tbody>
                </table>

                <div class="tab-footer clear f1">
                    {% if session.get('domainGlobalAdmin') is sameas true %}
                        <div class="fl">
                            <select name="action" class="fl-space">
                                <option>{{ _('Choose Action') }}</option>
                                <option value="enable">{{ _('Enable') }}</option>
                                <option value="disable">{{ _('Disable') }}</option>
                                <option value="delete">{{ _('Delete') }}</option>
                            </select>
                            <input type="submit" value="{{ _('Apply') }}" class="button fl-space" />
                        </div>
                    {% endif %}

                    {{ show_pages(baseurl=ctx.homepath + '/domains', total=total, cur_page=cur_page) }}
                </div>
            </form>

        </div>
    </div>

{% endblock main %}

{% block js %}
    {% if session.get('domainGlobalAdmin') is sameas true %}
        {% set nonSortedCols = [0] %}
    {% else %}
        {% set nonSortedCols = [] %}
    {% endif %}

    {{ load_jquery(['tablesorter'], nonSortedCols=nonSortedCols) }}
{% endblock js %}