<mt:setvar name="list_role" value="1">
<mt:setvarblock name="page_title"><__trans phrase="Manage Roles"></mt:setvarblock>
<mt:setvarblock name="system_msg">
    <mt:if name="saved_deleted">
        <mtapp:statusmsg
            id="saved-deleted"
            class="success">
            <__trans phrase="You have successfully deleted the role(s).">
        </mtapp:statusmsg>
    </mt:if>
</mt:setvarblock>
<mt:setvarblock name="action_buttons">
    <mt:if name="is_administrator">
    <button
        onclick="doRemoveItems(getByID('<$mt:var name="object_type"$>-listing-form'), '<__trans phrase="role" escape="js">', '<__trans phrase="roles" escape="js">'); return false;"
        accesskey="x"
        title="<__trans phrase="Delete selected [_1] (x)">"
        ><__trans phrase="Delete"></button>
    </mt:if>
</mt:setvarblock>
<mt:if name="object_loop">
    <mt:setvarblock name="html_body_footer">
        <$mt:include name="include/display_options.tmpl"$>
    </mt:setvarblock>
</mt:if>
<mt:setvarblock name="html_head" append="1">
    <script type="text/javascript">
    /* <![CDATA[ */
    var tableSelect;
    function init()
    {
        // setup
        tableSelect = new TC.TableSelect( "role-listing-table" );
        tableSelect.rowSelect = true;
    }
    /* ]]> */
    </script>
</mt:setvarblock>
<mt:setvarblock name="content_header">
    <mt:if name="can_create_role">
    <ul class="action-link-list">
        <li><a href="<mt:var name="script_url">?__mode=view&amp;_type=role" class="icon-left icon-create"><__trans phrase="Create Role"></a></li>
    </ul>
    </mt:if>
</mt:setvarblock>
<mt:include name="include/header.tmpl">
<mtapp:listing
    type="role">
    <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="status si"><img src="<mt:var name="static_uri">images/status_icons/invert-flag.gif" alt="<__trans phrase="_USER_STATUS_CAPTION">" title="<__trans phrase="_USER_STATUS_CAPTION">" width="9"height="9" /></th>
            <th class="name"><__trans phrase="Role"></th>
            <th class="description primary-col"><__trans phrase="Description"></th>
            <th class="members"><__trans phrase="Association"></th>
            <th class="created-by"><__trans phrase="Created By"></th>
        </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><mt:unless name="members"> inactive</mt:unless>">
            <td class="cb"><input type="checkbox" name="id" value="<mt:var name="id" escape="html">" class="select" /></td>
            <td class="si <mt:if name="members">role-status-active<mt:else>role-status-inactive</mt:if>">
                <img src="<mt:var name="static_uri">images/spacer.gif" alt="<mt:if name="members"><__trans phrase="Role Is Active"><mt:else><__trans phrase="Role Not Being Used"></mt:if>" width="9" height="9" />
            </td>
            <td><a href="<mt:var name="script_url">?__mode=view&amp;_type=role&amp;id=<mt:var name="id" escape="html">"><mt:var name="name" escape="html"><mt:if name="has_edit_access"></a></mt:if></td>
            <td><mt:var name="description" escape="html"></td>
            <td><a href="<mt:var name="script_url">?__mode=list_association&amp;role_id=<mt:var name="id" escape="url">"><mt:var name="members"></a></td>
            <td><mt:if name="created_by"><mt:var name="created_by" escape="html"><mt:else><em><__trans phrase="System"></em></mt:if></td>
        </tr>
    <mt:if name="view_expanded">
        <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if> slave<mt:unless name="members"> inactive</mt:unless>">
            <td>&nbsp;</td><td colspan="6"><div class="detail-inner"><__trans phrase="Permissions">: <mt:loop name="perm_loop"><mt:var name="name" escape="html"><mt:unless name="__last__">, </mt:unless></mt:loop></div></td>
        </tr>
    </mt:if>
    <mt:if name="__last__">
    </tbody>
    </mt:if>
</mtapp:listing>

<mt:setvarblock name="jq_js_include" append="1">
    init();
    jQuery.mtCheckbox();
</mt:setvarblock>
<mt:include name="include/footer.tmpl">
