diff options
Diffstat (limited to 'templates/content_permissions.tpl')
| -rw-r--r-- | templates/content_permissions.tpl | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/templates/content_permissions.tpl b/templates/content_permissions.tpl index 58bfa6d..5e34e5a 100644 --- a/templates/content_permissions.tpl +++ b/templates/content_permissions.tpl @@ -1,5 +1,4 @@ -{strip} - +<script type="text/javascript">/*<![CDATA[*/ show_spinner('spinner'); /*]]>*/</script> <div class="admin liberty"> <div class="header"> <h1>{tr}Assign permissions{/tr}</h1> @@ -10,33 +9,29 @@ {if !$contentPerms.assigned} {formfeedback warning="No Individual permissions set. Global Permissions apply."} - {else} + {/if} + + {if $contentPerms.assigned || $gBitThemes->isJavascriptEnabled()} {smartlink ititle="Clear all custom content permissions" action=expunge content_id=$gContent->mContentId} {/if} - {if count($contentPerms.groups) lt 10} + {if count($contentPerms.groups) <= 10} {assign var=size value="large/"} {/if} <table class="data"> <caption>{tr}Permissions set for this content item{/tr}</caption> - {capture assign=th} - <tr> - <th>{tr}Permission{/tr}</th> - {foreach from=$contentPerms.groups item=group} - <th onmouseover="showById('f{$group.group_id}');hideById('a{$group.group_id}')"> - <abbr id="a{$group.group_id}" title="{$group.group_name}">{if count($contentPerms.groups) gt 10}{$group.group_name|truncate:4:false}{else}{$group.group_name}{/if}</abbr> - <span id="f{$group.group_id}" style="display:none">{$group.group_name}</span> - </th> - {/foreach} - </tr> - {/capture} - {$th} + <tr> + <th>{tr}Permission{/tr}</th> + {foreach from=$contentPerms.groups item=group} + <th onmouseover="showById('f{$group.group_id}');hideById('a{$group.group_id}')"> + <abbr id="a{$group.group_id}" title="{$group.group_name}">{if count($contentPerms.groups) gt 10}{$group.group_name|truncate:4:false}{else}{$group.group_name}{/if}</abbr> + <span id="f{$group.group_id}" style="display:none">{$group.group_name}</span> + </th> + {/foreach} + </tr> {foreach from=$contentPerms.assignable key=perm item=permInfo name=perms} - {* - {if ($smarty.foreach.perms.iteration % 10) eq 0 and ($smarty.foreach.perms.total - $smarty.foreach.perms.iteration) gt 5}{$th}{/if} - *} <tr class="{cycle values="odd,even"}"> <td>{$permInfo.perm_desc}<br /><em>({$permInfo.perm_name})</em></td> {foreach from=$contentPerms.groups key=groupId item=groupInfo} @@ -52,8 +47,17 @@ {assign var=icon value="list-remove"} {* is_revoked icon *} {/if} {/if} + <td style="text-align:center"> - {smartlink itra=false ititle="`$contentPerms.groups.$groupId.group_name` :: $perm" ibiticon=icons/$size$icon action=$action content_id=$gContent->mContentId perm=$perm group_id=$groupId} + {if $gBitThemes->isJavascriptEnabled()} + <span id="{$perm}{$groupId}"> + <a title="{$contentPerms.groups.$groupId.group_name} :: {$perm}" href="javascript:ajax_updater('{$perm}{$groupId}', '{$smarty.const.LIBERTY_PKG_URL}content_permissions.php', 'action={$action}&content_id={$gContent->mContentId}&perm={$perm}&group_id={$groupId}')"> + {biticon iname=$size$icon iexplain=""} + </a> + </span> + {else} + {smartlink itra=false ititle="`$contentPerms.groups.$groupId.group_name` :: $perm" ibiticon=icons/$size$icon action=$action content_id=$gContent->mContentId perm=$perm group_id=$groupId} + {/if} </td> {/foreach} </tr> @@ -71,5 +75,3 @@ {/if} </div><!-- end .body --> </div><!-- end .liberty --> - -{/strip} |
