{* * $Revision: 1.19 $ * If you want to customize this file, do not edit it directly since future upgrades * may overwrite it. Instead, copy it into a new directory called "local" and edit that * version. Gallery will look for that file first and use it if it exists. *}

{g->text text="Permissions"}

{if !empty($status)}

{if isset($status.changedOwner)} {g->text text="Owner changed successfully"} {/if} {if isset($status.addedGroupPermission)} {g->text text="Group permission added successfully"} {/if} {if isset($status.addedUserPermission)} {g->text text="User permission added successfully"} {/if} {if isset($status.deletedGroupPermission)} {g->text text="Group permission removed successfully"} {/if} {if isset($status.deletedUserPermission)} {g->text text="User permission removed successfully"} {/if}

{/if} {if $ItemPermissions.can.changePermissions}

{g->text text="Each item has its own independent set of permissions. Changing the parent's permissions has no effect on the permissions of the child. This allows you to restrict access to the parent of this item, but still grant full access to this item, or vice versa. The most efficient way to use this permission system is to create groups and assign permissions to them. Then if you want to grant permissions to a specific user, you can add (or remove) the user from the appropriate group."}

{/if}

{g->text text="Owner"}

{if empty($ItemPermissions.owner.fullName)} {g->text text="This item is owned by user: %s" arg1=$ItemPermissions.owner.userName} {else} {g->text text="This item is owned by user: %s (%s)" arg1=$ItemPermissions.owner.userName arg2=$ItemPermissions.owner.fullName} {/if}

{if $ItemPermissions.can.changeOwner}

{g->text text="New owner"}

{g->autoComplete element="giFormUsername"} {g->url arg1="view=core.SimpleCallback" arg2="command=lookupUsername" arg3="prefix=__VALUE__" htmlEntities=false} {/g->autoComplete} {if $ItemPermissions.can.applyToSubItems}

{g->text text="Apply new owner to sub-items"}

{/if} {if !empty($form.error.owner.missingUser)}
{g->text text="You must enter a user name"}
{/if} {if !empty($form.error.owner.invalidUser)}
{g->text text="The user name you entered is invalid"}
{/if} {/if}
{if $ItemPermissions.can.changePermissions && $ItemPermissions.can.applyToSubItems}

{g->text text="Apply changes"}

{g->text text="This item has sub-items. The changes you make here can be applied to just this item, or you can apply them to all sub-items. Note that applying changes to sub-items will merge your change into the existing permissions of the sub-items and may be very time consuming if you have many sub-items. It's more efficient to grant permissions to groups and then add and remove users from groups whenever possible. Changes are applied to sub-items by default."}

{/if}

{g->text text="Group Permissions"}

{if $ItemPermissions.can.changePermissions} {/if} {if $ItemPermissions.groupPermissions} {section name=group loop=$ItemPermissions.groupPermissions} {assign var="entry" value=$ItemPermissions.groupPermissions[group]} {assign var="index" value=$smarty.section.group.iteration} {if $ItemPermissions.can.changePermissions} {/if} {/section} {/if}
{g->text text="Group name"} {g->text text="Permission"} {g->text text="Action"}
{$entry.group.groupName} {$entry.permission.description} {if !empty($entry.deleteList)} {else}   {/if}
{if $ItemPermissions.can.changePermissions}

{g->text text="New Group Permission"}

{g->autoComplete element="giFormGroupname"} {g->url arg1="view=core.SimpleCallback" arg2="command=lookupGroupname" arg3="prefix=__VALUE__" htmlEntities=false} {/g->autoComplete} {if !empty($form.error.group.invalidPermission)}
{g->text text="The permission you chose is invalid"}
{/if} {if !empty($form.error.group.missingGroup)}
{g->text text="You must enter a group name"}
{/if} {if !empty($form.error.group.invalidGroup)}
{g->text text="The group name you entered is invalid"}
{/if} {if !empty($form.error.group.alreadyHadPermission)}
{g->text text="Group already has this permission (check sub-permissions)"}
{/if}
{/if}

{g->text text="User Permissions"}

{if $ItemPermissions.can.changePermissions} {/if} {if $ItemPermissions.userPermissions} {section name=user loop=$ItemPermissions.userPermissions} {assign var="entry" value=$ItemPermissions.userPermissions[user]} {assign var="index" value=$smarty.section.user.iteration} {if $ItemPermissions.can.changePermissions} {/if} {/section} {/if}
{g->text text="User name"} {g->text text="Permission"} {g->text text="Action"}
{$entry.user.userName} {$entry.permission.description} {if !empty($entry.deleteList)} {else}   {/if}
{if $ItemPermissions.can.changePermissions}

{g->text text="New User Permission"}

{g->autoComplete element="giFormUsername2"} {g->url arg1="view=core.SimpleCallback" arg2="command=lookupUsername" arg3="prefix=__VALUE__" htmlEntities=false} {/g->autoComplete} {if !empty($form.error.user.invalidPermission)}
{g->text text="The permission you chose is invalid"}
{/if} {if !empty($form.error.user.missingUser)}
{g->text text="You must enter a user name"}
{/if} {if !empty($form.error.user.invalidUser)}
{g->text text="The user name you entered is invalid"}
{/if} {if !empty($form.error.user.alreadyHadPermission)}
{g->text text="The user already has this permission (check sub-permissions)"}
{/if}
{/if}