<mt:if name="entry_type" eq="page">
    <$mt:setvar name="type_label" value="<__trans phrase="Pages">"$>
    <$mt:setvar name="mode" value="list_page"$>
<mt:else>
    <$mt:setvar name="type_label" value="<__trans phrase="Entries">"$>
    <$mt:setvar name="mode" value="list_entry"$>
</mt:if>

<mt:setvarblock name="action_buttons">
    <mt:if name="is_administrator">
    <button
        accesskey="e"
        title="<__trans phrase="Enable selected users (e)">"
        class="mt-enable-users"
        ><__trans phrase="_USER_ENABLE" escape="js"></button>
    <button
        accesskey="d"
        title="<__trans phrase="Disable selected users (d)">"
        class="mt-disable-users"
        ><__trans phrase="_USER_DISABLE" escape="js"></button>
    </mt:if>
</mt:setvarblock>

<mtapp:listing>
    <mt:if name="__first__">
        <mt:setvarblock name="table_header">
            <tr>
                <th class="cb"><input type="checkbox" name="id-head" value="all" class="select" /></th>
                <th class="flag si"><img src="<mt:var name="static_uri">images/status_icons/invert-flag.gif" alt="<__trans phrase="Status">" title="<__trans phrase="Status">" width="9" height="9" /></th>
                <th class="username primary-col"><__trans phrase="Username"></th>
                <th class="name"><__trans phrase="Display Name"></th>
                <th class="created"><__trans phrase="Created By"></th>
                <mt:unless name="hide_entries_col"><th class="entries"><mt:var name="type_label"></th></mt:unless><mt:loop name="more_column_headers"><mt:var name="__value__"></mt:loop>
            </tr>
        </mt:setvarblock>
        <thead>
            <mt:var name="table_header">
        </thead>
        <tfoot>
            <mt:var name="table_header">
        </tfoot>
        <tbody>
    </mt:if>
            <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if>">
                <td class="cb"><input<mt:if name="is_administrator"><mt:if name="is_me"> id="sysadmin"</mt:if></mt:if> type="checkbox" name="id" value="<mt:var name="id">" class="select" /></td>
                <td class="flag <mt:if name="status_enabled">user-status-enabled<mt:else><mt:if name="status_pending">user-status-pending<mt:else>user-status-disabled</mt:if></mt:if> si"><img src="<mt:var name="static_uri">images/spacer.gif" alt="<mt:if name="status_enabled"><__trans phrase="_USER_ENABLED"><mt:else><mt:if name="status_pending"><__trans phrase="Pending"><mt:else><__trans phrase="_USER_DISABLED"></mt:if></mt:if>" width="13" height="9" /></td>
                <td class="username"><mt:if name="has_edit_access"><a href="<mt:var name="script_url">?__mode=view&amp;_type=author&amp;id=<mt:var name="id">"></mt:if><mt:var name="name" escape="html"><mt:if name="has_edit_access"></a></mt:if></td>
                <td class="name">
                    <mt:if name="nickname"><span class="status-name"><mt:var name="nickname" escape="html"></span></mt:if>
                    <mt:if name="email"><span class="status-email"><a href="mailto:<mt:var name="email" escape="html">" title="<mt:var name="email" escape="html">"><img src="<mt:var name="static_uri">images/spacer.gif" alt="<__trans phrase="Email">" width="16" height="9" /></a></span></mt:if>
                    <mt:if name="url"><span class="status-link"><a href="<mt:var name="url" escape="html">" title="<mt:var name="url" escape="html">"><img src="<mt:var name="static_uri">images/spacer.gif" alt="<__trans phrase="Link">" width="16" height="9" /></a></span></mt:if>
                </td>
                <td class="created"><mt:if name="created_by_name"><mt:var name="created_by_name" escape="html"><mt:else><em><__trans phrase="System"></em></mt:if></td>
                <mt:unless name="hide_entries_col"><td class="entries"><mt:if name="entry_count"><a href="<mt:var name="script_url">?__mode=<mt:if name="blog_id"><mt:var name="mode"><mt:else>search_replace</mt:if>&amp;blog_id=<mt:if name="blog_id"><mt:var name="blog_id"><mt:else>0</mt:if>&amp;filter=author_id&amp;filter_val=<mt:var name="id">&amp;_type=entry"><mt:var name="entry_count"></a><mt:else>&nbsp;</mt:if></td></mt:unless><mt:loop name="more_columns"><mt:var name="__value__"></mt:loop>
            </tr>
    <mt:if name="__last__">
        </tbody>
    </mt:if>
</mtapp:listing>
<mt:setvarblock name="jq_js_include" append="1">
    jQuery('button.mt-enable-users').mtEnableUsers({
        id: '<$mt:var name="object_type"$>-listing-form',
        plural: '<__trans phrase="user" escape="js">',
        args: {<mt:if name="search">'search': '<mt:var name="search" escape="js">'</mt:if>},
        phrase: '<__trans phrase="users" escape="js">'
    });
    jQuery('button.mt-disable-users').mtDisableUsers({
        message: '<__trans phrase="_NO_SUPERUSER_DISABLE" escape="js">',
        id: '<$mt:var name="object_type"$>-listing-form',
        plural: '<__trans phrase="user" escape="js">',
        args: {<mt:if name="search">'search': '<mt:var name="search" escape="js">'</mt:if>},
        phrase: '<__trans phrase="users" escape="js">'
    });
    jQuery('button.mt-<mt:var name="form_id">-action').mtDoPluginAction({
        id: '<mt:var name="form_id">',
        plural: '<mt:if name="object_label_plural"><mt:var name="object_label_plural" escape="js"></mt:if>',
        phrase: '<__trans phrase="to act upon" escape="js">'
    });
</mt:setvarblock>

