From c224408f07ebc9ca31f8c76cdf5ead73b13b4c0d Mon Sep 17 00:00:00 2001 From: "bitweaver.org" Date: Sun, 15 Jul 2007 17:04:03 +0000 Subject: improve UI when there's few groups by increasing icon size and display large matrix when there's many groups. might look daunting to start off with but it's easier to deal with in the long run. --- templates/content_permissions.tpl | 149 ++++++++++---------------------------- 1 file changed, 40 insertions(+), 109 deletions(-) (limited to 'templates/content_permissions.tpl') diff --git a/templates/content_permissions.tpl b/templates/content_permissions.tpl index c4ae116..bdb9b35 100644 --- a/templates/content_permissions.tpl +++ b/templates/content_permissions.tpl @@ -15,121 +15,52 @@ {/if} {if count($contentPerms.groups) lt 10} - - - - - {foreach from=$contentPerms.groups item=group} - - {/foreach} - + {assign var=size value="large/"} + {/if} - {foreach from=$contentPerms.assignable key=perm item=permInfo} - - - {foreach from=$contentPerms.groups key=groupId item=groupInfo} - {assign var=icon value="icons/media-playback-stop"} {* default icon *} - {assign var=action value="assign"} {* default action *} - {if $groupInfo.perms.$perm} {* global active permissions *} - {assign var=icon value="icons/dialog-ok"} {* default active permission icon *} - {if $contentPerms.assigned.$groupId.$perm} - {assign var=icon value="icons/list-add"} {* custon permission icon *} - {assign var=action value="remove"} {* remove permission if we have a custom one *} - {/if} - {if $contentPerms.assigned.$groupId.$perm.is_revoked} - {assign var=icon value="icons/list-remove"} {* is_revoked icon *} - {/if} - {/if} - - {/foreach} - +
{tr}Permissions set for this content item{/tr}
{tr}Permission{/tr}{$group.group_name}
{$permInfo.perm_desc}
({$permInfo.perm_name})
{smartlink itra=false ititle=$perm ibiticon=$icon action=$action content_id=$gContent->mContentId perm=$perm group_id=$groupId}
+ + + + {foreach from=$contentPerms.groups item=group} + {if count($contentPerms.groups) lt 10} + + {else} + + {/if} {/foreach} -
{tr}Permissions set for this content item{/tr}
{tr}Permission{/tr}{$group.group_name}{$group.group_id}
- - {else} + - {form} - - - -
- {formlabel label="Assign this Permission" for="perm"} - {forminput} - - {formhelp note=""} - {/forminput} -
- -
- {formlabel label="To this Group" for="group_id"} - {forminput} - - {formhelp note=""} - {/forminput} -
- -
- - -
- {/form} - - {if $contentPerms.assigned} - - - - - - - - {foreach from=$contentPerms.assigned key=groupId item=groupInfo} - {foreach from=$groupInfo key=perm item=permInfo name=fgroup} - - {if $smarty.foreach.fgroup.first} - - {/if} - - - - {/foreach} - {foreachelse} - - - + {foreach from=$contentPerms.assignable key=perm item=permInfo} + + + {foreach from=$contentPerms.groups key=groupId item=groupInfo} + {assign var=icon value="media-playback-stop"} {* default icon *} + {assign var=action value="assign"} {* default action *} + {if $groupInfo.perms.$perm} {* global active permissions *} + {assign var=icon value="dialog-ok"} {* default active permission icon *} + {if $contentPerms.assigned.$groupId.$perm} + {assign var=icon value="list-add"} {* custon permission icon *} + {assign var=action value="remove"} {* remove permission if we have a custom one *} + {/if} + {if $contentPerms.assigned.$groupId.$perm.is_revoked} + {assign var=icon value="list-remove"} {* is_revoked icon *} + {/if} + {/if} + {/foreach} -
{tr}Custom permissions assigned to this content{/tr}
{tr}Group{/tr}{tr}Permission{/tr}{tr}Action{/tr}
{$permInfo.group_name} - {if $contentPerms.assigned.$groupId.$perm.is_revoked} - {biticon iname=list-remove iexplain="Removed Permission"} - {else} - {biticon iname=list-add iexplain="Added Permission"} - {/if} {$permInfo.perm_desc} ({$permInfo.perm_name}) - - {smartlink ititle="Remove Permission" ibiticon="icons/edit-delete" action=remove content_id=$gContent->mContentId perm=$perm group_id=$groupId} -
{tr}No individual permissions, global permissions apply{/tr}
{$permInfo.perm_desc}
({$permInfo.perm_name})
{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} + + {/foreach} + -

{tr}Default Permissions{/tr}

- + {/if} -- cgit v1.3