Source

iredadmin-ose / templates / default / pgsql / user / list.html

{% extends "layout.html" %}

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

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

{% block title %}{{ _('Mail Users') }}{% endblock %}
{% block navlinks_active_domains %}class="active"{% endblock %}

{% block main %}

{# Show system message #}
{{ userMsgHandler(msg) }}

{% if users is defined %}

    {# List all users. #}
    <div class="content-box">
        <div class="box-body">
            <div class="box-header clear">
                <ul class="tabs clear">
                    <li class="active"><a href="{{ctx.homepath}}/users/{{cur_domain}}">{{ _('Users') }}</a></li>
                    <li><a href="{{ctx.homepath}}/create/user/{{cur_domain}}"><img src="{{ctx.homepath}}/static/{{skin}}/images/ico_add_12.png" /> {{ _('User') }}</a>
                </ul>

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

                    <a href="{{ctx.homepath}}/profile/domain/general/{{cur_domain}}"><img src="{{ctx.homepath}}/static/{{skin}}/images/action_edit.png" title="{{ _('Edit domain profile') }}" class="vcenter"/></a>
                </h2>
            </div>

            <div class="box-wrapper clear">
            <div id="user_list">
    <form name="users" id="account_list" method="post" action="{{ctx.homepath}}/users/{{cur_domain}}">
    {{ display_csrf_token() }}
    <table class="style1 tablesorter" cellspacing="0">
        <thead>
        <tr>
            <th class="checkbox"><input type="checkbox" class="checkbox select-all" /></th>
            <th>{{ _('Display Name') }}</th>
            <th>{{ _('Mail Address') }}</th>
            <th>{{ _('User ID') }}</th>
            {#
            <th>{{ _('Job Title') }}</th>
            #}
            <th>{{ _('Quota') }}</th>
        </tr>
        </thead>

        <tbody>
        {% if users|length > 0 %}
            {% for r in users %}
                {% set username = r.username |e %}
                <tr>
                    <td class="checkbox"><input type="checkbox" name="mail" value="{{username}}" /></td>
                    <td class="vcenter">
                        <a href="{{ctx.homepath}}/profile/user/general/{{username}}"><img src="{{ctx.homepath}}/static/{{skin}}/images/action_edit.png" title="{{ _('Edit account profile') }}" class="fr-space"/></a>
                        {{ set_account_status_img(r.active) }}
                        {% if r.name %}
                            {{ r.name |cutString |e }}
                        {% else %}
                            {{ r.username.split('@', 1)[0] }}
                        {% endif %}
                    </td>
                    <td class="vcenter">{{ highlight_username_in_mail(username) }}</td>
                    <td class="vcenter">{% if r.employeeid %}{{ r.employeeid |e }}{% endif %}</td>
                    {#
                    <td class="vcenter">{{ jobTitle }}</td>
                    #}

                    {# mail quota #}
                    {% if r.quota == 0 %}
                        <td class="vcenter">{{ _('Unlimited') }}</td>
                    {% else %}
                        <td class="vcenter">
                            <span title="{{ _('Allocated') }}">{{ r.quota |filesizeformat(baseMB=True) }}</span>
                        </td>
                    {% endif %}
                </tr>
            {% endfor %}
        {% else %}
            <tr>
                <td class="checkbox"></td>
                <td colspan="4">{{ _('No mail user available.') }} <a href="{{ctx.homepath}}/create/user/{{ cur_domain }}">{{ _('Add one') }}</a>?</td>
            </tr>
        {% endif %}
        </tbody>
    </table>

    <input type="hidden" name="cur_page" value="{{cur_page}}" />

    <div class="tab-footer clear f1">
        <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>

        {{ show_pages(baseurl=ctx.homepath + '/users/' + cur_domain, total=total, cur_page=cur_page) }}
    </div>
</div>{# #user_list #}
    </div>{# .box-wrapper #}
</form>
</div>{# -- End id=user_list -- #}
</div>
{% endif %}
{% endblock main %}

{% block js %}
    {{ load_jquery(['tablesorter'], nonSortedCols=[0]) }}
{% endblock js %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.