{include file="$admintemplatepath/header.template"}
{include file="$admintemplatepath/navigation.template" showOpt=permissionsList title=$locale->tr("permissionsList")}

			            
 <form id="deletePermissions" action="admin.php" method="post">
 <div id="list">
  {include file="$admintemplatepath/successmessage.template"}
  {include file="$admintemplatepath/errormessage.template"}
 <table id="list" class="info" summary="{$locale->tr("permissionsList")}">
  <thead>
   <tr>
    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('deletePermissions');" /></th>
    <th style="width:30%;">{$locale->tr("name")}</th>
    <th style="width:50%;">{$locale->tr("description")}</th>
    <th style="width:5%">{$locale->tr("core_perm")}</th>
    <th style="width:5%">{$locale->tr("admin_only")}</th>
    <th style="width:10%;">{$locale->tr("actions")}</th>
   </tr>
  </thead>
  <tbody> 
  {foreach from=$perms item=perm}
  <tr class="{cycle values="odd, even"}">
   <td>
	 {if !$perm->isCorePermission()}
      <input class="checkbox" type="checkbox" name="permIds[{counter}]" id="checks_{$perm->getId()}" value="{$perm->getId()}" />
     {/if}
   </td>  
   <td class="col_highlighted">
    <a href="admin.php?op=editPermission&amp;permId={$perm->getId()}">{$perm->getName()}</a>
   </td>
   <td>
	{$locale->tr($perm->getDescription())}
   </td>
   <td>
	{if $perm->isCorePermission()}{$locale->tr("yes")}{else}{$locale->tr("no")}{/if}
   </td>
   <td>
	{if $perm->isAdminOnlyPermission()}{$locale->tr("yes")}{else}{$locale->tr("no")}{/if}
   </td>
   <td>
     <div class="list_action_button">
	   {check_perms adminperm=update_permission}	
       {if !$perm->isCorePermission()}
          <a href="?op=editPermission&amp;permId={$perm->getId()}" title="{$locale->tr("edit")}">
	        <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
	      </a>
	   {/if}
       {if !$perm->isCorePermission()}
         <a href="?op=deletePermission&amp;permId={$perm->getId()}" title="{$locale->tr("delete")}">
	      <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
	    </a>
	   {/if}
	  {/check_perms}
     </div>
   </td>
  </tr>
  {/foreach}
 </tbody> 
 </table>
 </div>
 <div id="list_action_bar">
  {check_perms adminperm=update_permission}		
  <input type="hidden" name="op" value="deletePermissions"/>
  <input type="submit" name="Delete selected" value="{$locale->tr("delete")}"/>
  {/check_perms}
 </div>
 </form>
{include file="$admintemplatepath/footernavigation.template"}
{include file="$admintemplatepath/footer.template"}