{#if $T.d.length == 0}
<div class="info">
    You haven't defined any roles so far. To add a new role use the link in the top right corner of the page.
</div>
{#else}
<table id="RoleService" class="beTable rounded">
  <thead>
    <tr>
	  <th width="20"><input type="checkbox" name="chkAllRoles" onclick="toggleAllChecks(this)"/></th>
      <th width="auto">Roles</th>
	  <th width="120">&nbsp;</th>
    </tr>
  </thead>
  <tbody>
    {#foreach $T.d as post}
    <tr class="{#cycle values=['','alt']}">
	  <td><input type="checkbox" name="chk"{$T.post.RoleName} class="chk"/></td>
      <td class="editable">{$T.post.RoleName}</td>
      <td>
            <ul class="rowTools">
                <li>
                    <a class="toolsAction" href="#"><span class="">Tools</span></a>
                    <ul class="rowToolsMenu">
                        {#if !$T.post.IsSystemRole}<li><a href="#" class="editButton editAction">Edit</a></li>{#/if}
                        {#if !$T.post.IsSystemRole}<li><a href="#" class="deleteButton deleteAction">Delete</a></li>{#/if}
                        <li><a href="Rights.aspx?role={$T.post.RoleName}" class="rightsAction">Rights</a></li>
                    </ul>
                </li>
            </ul>
      </td>
    </tr>
    {#/for}
  </tbody>
</table>
{#/if}