clipbucket/upload/admin_area/styles/cbv2/layout/user_levels.html
2013-10-07 12:17:06 +00:00

231 lines
7.6 KiB
HTML

<link href="../theme/stylesheet.css" rel="stylesheet" type="text/css">
<h2>User Levels</h2>
{if $view=='view'}
<a href="?mode=add">Add New Level</a>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr class="tr_head">
<td width="20">ID</td>
<td width="200">Name</td>
<td width="50">Active</td>
<td width="50">Users</td>
<td>Actions</td>
</tr>
{assign var=levels value=$userquery->get_levels()}
{section name=l loop=$levels}
<tr class="td_body">
<td>{$levels[l].user_level_id}</td>
<td>{$levels[l].user_level_name}</td>
<td>{$levels[l].user_level_active}</td>
<td>{$userquery->get_level_users($levels[l].user_level_id,true)}</td>
<td><a href="?mode=edit&lid={$levels[l].user_level_id}">Edit</a>{if $levels[l].user_level_is_default !=yes} | <a href="?action=delete&lid={$levels[l].user_level_id}">Remove</a>{/if}</td>
</tr>
{sectionelse}
<tr class="td_body">
<td colspan="5" align="center">No Levels Were Found</td>
</tr>
{/section}
</table>
{elseif $view=='edit'}
<form action="" method="post">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10px">
<tr>
<td width="30" class="left_head">&nbsp;</td>
<td align="left" class="head">Edit Level Permissions</td>
<td width="30" class="right_head">&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" >
<tr bgcolor="{$bgcolor}" class="item_listing">
<td style="padding:5px 0px 5px 10px"><strong>Level Name</strong></td>
<td style="padding:5px 0px 5px 10px" width="250"><span class="tips">
<input name="level_name" type="text" id="level_name2" value="{$level_details.user_level_name|form_val}" />
</span></td>
</tr>
</table>
{assign var='types' value=$userquery->get_level_types()}
{section name=t loop=$types}
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10px">
<tr>
<td width="30" class="left_head">&nbsp;</td>
<td align="left" class="head">{$types[t].user_permission_type_name}</td>
<td width="30" class="right_head">&nbsp;</td>
</tr>
</table>
{assign var=perms value=$userquery->get_permissions($types[t].user_permission_type_id)}
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" >
{assign var = bgcolor value = ""}
{foreach from=$perms item=perm}
{if $perm.permission_id !=""}
<tr bgcolor="{$bgcolor}" class="item_listing">
<td style="padding:5px 0px 5px 10px"><strong>{$perm.permission_name}</strong><br />
<em>{$perm.permission_desc}</em></td>
<td style="padding:5px 0px 5px 10px" width="250">
{assign var="perm_code" value=$perm.permission_code}
<label>
<input type="radio" name="{$perm.permission_code}" value="yes" id="{$perm.permission_id}_yes" {if $level_perms.$perm_code=='yes'} checked="checked"{/if}/>
Yes</label>
<label>
<input type="radio" name="{$perm.permission_code}" value="no" id="{$perm.permission_id}_no" {if $level_perms.$perm_code==no} checked="checked"{/if}/>
No</label>
</td>
</tr>
{else}
<tr><td><div style="width:100%; margin:auto" align="center"><em>No Permission Found</em></div></td></tr>
{/if}
{if $bgcolor == ""}
{assign var = bgcolor value = "#EEEEEE"}
{else}
{assign var = bgcolor value = ""}
{/if}
{foreachelse}
<tr><td><div style="width:100%; margin:auto" align="center"><em>No Permission Found</em></div></td></tr>
{/foreach}
</table>
{/section}
{if $Cbucket->plugins_perms}
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10px">
<tr>
<td width="30" class="left_head">&nbsp;</td>
<td align="left" class="head">Plugins Permissions</td>
<td width="30" class="right_head">&nbsp;</td>
</tr>
</table>
{assign var=perms value=$Cbucket->plugins_perms}
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" >
{assign var = bgcolor value = ""}
{foreach from=$perms item=perm}
<tr bgcolor="{$bgcolor}" class="item_listing">
<td style="padding:5px 0px 5px 10px"><strong>{$perm.plugin_name}</strong><br />
<em>{$perm.plugin_desc}</em></td>
<td style="padding:5px 0px 5px 10px" width="250">
<label>
{assign var=perm_plugin_code value=$perm.plugin_code}
<input type="radio" name="plugin_perm[{$perm.plugin_code}]" value="yes" id="{$plugin_perms.plugin_code}_yes" {if $plugin_perms.$perm_plugin_code!='no'} checked="checked"{/if}/>
Yes</label>
<label>
<input type="radio" name="plugin_perm[{$perm.plugin_code}]" value="no" id="{$plugin_perms.plugin_code}_no" {if $plugin_perms.$perm_plugin_code==no} checked="checked"{/if}/>
No</label>
</td>
</tr>
{if $bgcolor == ""}
{assign var = bgcolor value = "#EEEEEE"}
{else}
{assign var = bgcolor value = ""}
{/if}
{foreachelse}
<tr><td><div style="width:100%; margin:auto" align="center"><em>No Permission Found</em></div></td></tr>
{/foreach}
</table>
{/if}
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td><label for="button"></label>
<input type="submit" name="update_level_perms" id="button" value="Update" /></td>
</tr>
</table>
</form>
{elseif $view=='add'}
<form action="" method="post">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="30" class="left_head">&nbsp;</td>
<td align="left" class="head">User Level Details</td>
<td width="30" class="right_head">&nbsp;</td>
</tr>
</table>
<table width="98%" border="0" cellpadding="0" cellspacing="0" align="center" >
<tr bgcolor="{$bgcolor}" class="item_listing">
<td style="padding:5px 0px 5px 10px"><strong>Level Name</strong></td>
<td style="padding:5px 0px 5px 10px" width="250"><span class="tips">
<input name="level_name" type="text" id="level_name2" value="{$smarty.post.level_name|form_val}" />
</span></td>
</tr>
</table>
{assign var='types' value=$userquery->get_level_types()}
{section name=t loop=$types}
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="30" class="left_head">&nbsp;</td>
<td align="left" class="head">{$types[t].user_permission_type_name}</td>
<td width="30" class="right_head">&nbsp;</td>
</tr>
</table>
{assign var=perms value=$userquery->get_permissions($types[t].user_permission_type_id)}
<table width="98%" border="0" cellpadding="0" cellspacing="0" align="center" >
{assign var = bgcolor value = ""}
{foreach from=$perms item=perm}
{if $perm.permission_id !=""}
<tr bgcolor="{$bgcolor}" class="item_listing">
<td style="padding:5px 0px 5px 10px"><strong>{$perm.permission_name}</strong><br />
<em>{$perm.permission_desc}</em></td>
<td style="padding:5px 0px 5px 10px" width="250">
<label><input type="radio" name="{$perm.permission_code}" value="yes" id="{$perm.permission_id}_yes" />Yes</label>
<label><input type="radio" name="{$perm.permission_code}" value="no" id="{$perm.permission_id}_no" />No</label>
</td>
</tr>
{else}
<tr><td><div style="width:100%; margin:auto" align="center"><em>No Permission Found</em></div></td></tr>
{/if}
{if $bgcolor == ""}
{assign var = bgcolor value = "#EEEEEE"}
{else}
{assign var = bgcolor value = ""}
{/if}
{foreachelse}
<tr><td><div style="width:100%; margin:auto" align="center"><em>No Permission Found</em></div></td></tr>
{/foreach}
</table>
{/section}
<input type="submit" name="add_new_level" id="button" value="Add Level" />
</form>
{/if}