{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'} {combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'} {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"} {footer_script} (function(){ {* *} var groupsCache = new LocalStorageCache({ key: 'groupsAdminList', serverKey: '{$CACHE_KEYS.groups}', serverId: '{$CACHE_KEYS._hash}', loader: function(callback) { jQuery.getJSON('{$ROOT_URL}ws.php?format=json&method=pwg.groups.getList&per_page=99999', function(data) { callback(data.result.groups); }); } }); jQuery('[data-selectize=groups]').selectize({ valueField: 'id', labelField: 'name', searchField: ['name'], plugins: ['remove_button'] }); groupsCache.get(function(groups) { jQuery('[data-selectize=groups]').each(function() { this.selectize.load(function(callback) { callback(groups); }); jQuery.each(jQuery(this).data('value'), jQuery.proxy(function(i, id) { this.selectize.addItem(id); }, this)); }); }); {* *} var usersCache = new LocalStorageCache({ key: 'usersAdminList', serverKey: '{$CACHE_KEYS.users}', serverId: '{$CACHE_KEYS._hash}', loader: function(callback) { var users = []; // recursive loader (function load(page){ jQuery.getJSON('{$ROOT_URL}ws.php?format=json&method=pwg.users.getList&display=username&per_page=99999&page='+ page, function(data) { users = users.concat(data.result.users); if (data.result.paging.count == data.result.paging.per_page) { load(++page); } else { callback(users); } }); }(0)); } }); jQuery('[data-selectize=users]').selectize({ valueField: 'id', labelField: 'username', searchField: ['username'], plugins: ['remove_button'] }); usersCache.get(function(users) { jQuery('[data-selectize=users]').each(function() { this.selectize.load(function(callback) { callback(users); }); jQuery.each(jQuery(this).data('value'), jQuery.proxy(function(i, id) { this.selectize.addItem(id); }, this)); }); }); {* *} function checkStatusOptions() { if (jQuery("input[name=status]:checked").val() == "private") { jQuery("#privateOptions, #applytoSubAction").show(); } else { jQuery("#privateOptions, #applytoSubAction").hide(); } } checkStatusOptions(); jQuery("#selectStatus").change(function() { checkStatusOptions(); }); {if isset($nb_users_granted_indirect) && $nb_users_granted_indirect>0} jQuery(".toggle-indirectPermissions").click(function(e){ jQuery(".toggle-indirectPermissions").toggle(); jQuery("#indirectPermissionsDetails").toggle(); e.preventDefault(); }); {/if} }()); {/footer_script}

{$CATEGORIES_NAV} › {'Edit album'|@translate} {$TABSHEET_TITLE}

{'Access type'|@translate}


{'Groups and users'|@translate}

{if count($groups) > 0} {'Permission granted for groups'|@translate}
{else} {'There is no group in this gallery.'|@translate} {'Group management'|@translate} {/if}

{'Permission granted for users'|@translate}

{if isset($nb_users_granted_indirect) && $nb_users_granted_indirect>0}

{'%u users have automatic permission because they belong to a granted group.'|@translate:$nb_users_granted_indirect} {'show details'|@translate}

{/if} {*

{'Groups'|@translate}

{'Permission granted'|@translate}
    {foreach from=$group_granted_ids item=id}
  • {/foreach}
{'Permission denied'|@translate}
    {foreach from=$group_denied_ids item=id}
  • {/foreach}

{'Users'|@translate}

{'Permission granted'|@translate}
    {foreach from=$user_granted_direct_ids item=id}
  • {/foreach}
{'Permission granted thanks to a group'|@translate} {if isset($user_granted_indirects) }
    {foreach from=$user_granted_indirects item=user_group}
  • {$user_group.USER} ({$user_group.GROUP})
  • {/foreach}
{/if}
{'Permission denied'|@translate}
    {foreach from=$user_denied_ids item=id}
  • {/foreach}
*}