[13580] | 1 | {combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'} |
---|
| 2 | {combine_css path="themes/default/js/plugins/chosen.css"} |
---|
| 3 | |
---|
| 4 | {footer_script}{literal} |
---|
| 5 | jQuery(document).ready(function() { |
---|
| 6 | jQuery(".chzn-select").chosen(); |
---|
| 7 | |
---|
| 8 | function checkStatusOptions() { |
---|
| 9 | if (jQuery("input[name=status]:checked").val() == "private") { |
---|
| 10 | jQuery("#privateOptions, #applytoSubAction").show(); |
---|
| 11 | } |
---|
| 12 | else { |
---|
| 13 | jQuery("#privateOptions, #applytoSubAction").hide(); |
---|
| 14 | } |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | checkStatusOptions(); |
---|
| 18 | jQuery("#selectStatus").change(function() { |
---|
| 19 | checkStatusOptions(); |
---|
| 20 | }); |
---|
[13593] | 21 | |
---|
| 22 | jQuery("#indirectPermissionsDetailsShow").click(function(){ |
---|
| 23 | jQuery("#indirectPermissionsDetailsShow").hide(); |
---|
| 24 | jQuery("#indirectPermissionsDetailsHide").show(); |
---|
| 25 | jQuery("#indirectPermissionsDetails").show(); |
---|
| 26 | return false; |
---|
| 27 | }); |
---|
| 28 | |
---|
| 29 | jQuery("#indirectPermissionsDetailsHide").click(function(){ |
---|
| 30 | jQuery("#indirectPermissionsDetailsShow").show(); |
---|
| 31 | jQuery("#indirectPermissionsDetailsHide").hide(); |
---|
| 32 | jQuery("#indirectPermissionsDetails").hide(); |
---|
| 33 | return false; |
---|
| 34 | }); |
---|
[13580] | 35 | }); |
---|
| 36 | {/literal}{/footer_script} |
---|
| 37 | |
---|
[2531] | 38 | <div class="titrePage"> |
---|
[13013] | 39 | <h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> › {'Edit album'|@translate} {$TABSHEET_TITLE}</h2> |
---|
[2531] | 40 | </div> |
---|
| 41 | |
---|
| 42 | <form action="{$F_ACTION}" method="post" id="categoryPermissions"> |
---|
| 43 | |
---|
[13580] | 44 | <fieldset> |
---|
| 45 | <legend>{'Access type'|@translate}</legend> |
---|
| 46 | |
---|
| 47 | <p id="selectStatus"> |
---|
| 48 | <label><input type="radio" name="status" value="public" {if not $private}checked="checked"{/if}> <strong>{'public'|@translate}</strong> : <em>{'any visitor can see this album'|@translate}</em></label> |
---|
| 49 | <br> |
---|
| 50 | <label><input type="radio" name="status" value="private" {if $private}checked="checked"{/if}> <strong>{'private'|@translate}</strong> : <em>{'visitors need to login and have the appropriate permissions to see this album'|@translate}</em></label> |
---|
| 51 | </p> |
---|
| 52 | </fieldset> |
---|
| 53 | |
---|
| 54 | <fieldset id="privateOptions"> |
---|
| 55 | <legend>{'Groups and users'|@translate}</legend> |
---|
| 56 | |
---|
| 57 | <p> |
---|
[13593] | 58 | {if count($groups) > 0} |
---|
[13580] | 59 | <strong>{'Permission granted for groups'|@translate}</strong> |
---|
| 60 | <br> |
---|
| 61 | <select data-placeholder="{'Select groups...'|@translate}" class="chzn-select" multiple style="width:700px;" name="groups[]"> |
---|
| 62 | {html_options options=$groups selected=$groups_selected} |
---|
| 63 | </select> |
---|
[13593] | 64 | {else} |
---|
| 65 | {'There is no group in this gallery.'|@translate} <a href="admin.php?page=group_list" class="externalLink">{'Group management'|@translate}</a> |
---|
| 66 | {/if} |
---|
[13580] | 67 | </p> |
---|
| 68 | |
---|
| 69 | <p> |
---|
| 70 | <strong>{'Permission granted for users'|@translate}</strong> |
---|
| 71 | <br> |
---|
| 72 | <select data-placeholder="{'Select users...'|@translate}" class="chzn-select" multiple style="width:700px;" name="users[]"> |
---|
| 73 | {html_options options=$users selected=$users_selected} |
---|
| 74 | </select> |
---|
| 75 | </p> |
---|
| 76 | |
---|
[13593] | 77 | {if isset($nb_users_granted_indirect)} |
---|
| 78 | <p> |
---|
| 79 | {'%u users have automatic permission because they belong to a granted group.'|@translate|@sprintf:$nb_users_granted_indirect} |
---|
| 80 | <a href="#" id="indirectPermissionsDetailsHide" style="display:none">{'hide details'|@translate}</a> |
---|
| 81 | <a href="#" id="indirectPermissionsDetailsShow">{'show details'|@translate}</a> |
---|
| 82 | |
---|
| 83 | <ul id="indirectPermissionsDetails" style="display:none"> |
---|
| 84 | {foreach from=$user_granted_indirect_groups item=group_details} |
---|
| 85 | <li><strong>{$group_details.group_name}</strong> : {$group_details.group_users}</li> |
---|
| 86 | {/foreach} |
---|
| 87 | </ul> |
---|
| 88 | </p> |
---|
| 89 | {/if} |
---|
| 90 | |
---|
[13580] | 91 | {* |
---|
[2531] | 92 | <h4>{'Groups'|@translate}</h4> |
---|
| 93 | |
---|
| 94 | <fieldset> |
---|
| 95 | <legend>{'Permission granted'|@translate}</legend> |
---|
| 96 | <ul> |
---|
| 97 | {foreach from=$group_granted_ids item=id} |
---|
[3185] | 98 | <li><label><input type="checkbox" name="deny_groups[]" value="{$id}"> {$all_groups[$id]}</label></li> |
---|
[2531] | 99 | {/foreach} |
---|
| 100 | </ul> |
---|
[8128] | 101 | <input class="submit" type="submit" name="deny_groups_submit" value="{'Deny selected groups'|@translate}"> |
---|
[2531] | 102 | </fieldset> |
---|
| 103 | |
---|
| 104 | <fieldset> |
---|
| 105 | <legend>{'Permission denied'|@translate}</legend> |
---|
| 106 | <ul> |
---|
| 107 | {foreach from=$group_denied_ids item=id} |
---|
| 108 | <li><label><input type="checkbox" name="grant_groups[]" value="{$id}"> {$all_groups[$id]}</label></li> |
---|
| 109 | {/foreach} |
---|
| 110 | </ul> |
---|
[12825] | 111 | <input class="submit" type="submit" name="grant_groups_submit" value="{'Grant selected groups'|@translate}"> |
---|
[12018] | 112 | <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label> |
---|
[2531] | 113 | </fieldset> |
---|
| 114 | |
---|
| 115 | <h4>{'Users'|@translate}</h4> |
---|
| 116 | |
---|
| 117 | <fieldset> |
---|
| 118 | <legend>{'Permission granted'|@translate}</legend> |
---|
| 119 | <ul> |
---|
| 120 | {foreach from=$user_granted_direct_ids item=id} |
---|
[3185] | 121 | <li><label><input type="checkbox" name="deny_users[]" value="{$id}"> {$all_users[$id]}</label></li> |
---|
[2531] | 122 | {/foreach} |
---|
| 123 | </ul> |
---|
[8128] | 124 | <input class="submit" type="submit" name="deny_users_submit" value="{'Deny selected users'|@translate}"> |
---|
[2531] | 125 | </fieldset> |
---|
| 126 | |
---|
| 127 | <fieldset> |
---|
| 128 | <legend>{'Permission granted thanks to a group'|@translate}</legend> |
---|
| 129 | {if isset($user_granted_indirects) } |
---|
| 130 | <ul> |
---|
| 131 | {foreach from=$user_granted_indirects item=user_group} |
---|
| 132 | <li>{$user_group.USER} ({$user_group.GROUP})</li> |
---|
| 133 | {/foreach} |
---|
| 134 | </ul> |
---|
| 135 | {/if} |
---|
| 136 | </fieldset> |
---|
| 137 | |
---|
| 138 | <fieldset> |
---|
| 139 | <legend>{'Permission denied'|@translate}</legend> |
---|
| 140 | <ul> |
---|
| 141 | {foreach from=$user_denied_ids item=id} |
---|
| 142 | <li><label><input type="checkbox" name="grant_users[]" value="{$id}"> {$all_users[$id]}</label></li> |
---|
| 143 | {/foreach} |
---|
| 144 | </ul> |
---|
[12825] | 145 | <input class="submit" type="submit" name="grant_users_submit" value="{'Grant selected users'|@translate}"> |
---|
[12019] | 146 | <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label> |
---|
[2531] | 147 | </fieldset> |
---|
[13580] | 148 | *} |
---|
| 149 | </fieldset> |
---|
[2531] | 150 | |
---|
[13580] | 151 | <p style="margin:12px;text-align:left;"> |
---|
| 152 | <input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit"> |
---|
| 153 | <label id="applytoSubAction" style="display:none;"><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label> |
---|
| 154 | </p> |
---|
| 155 | |
---|
[12020] | 156 | <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> |
---|
[2531] | 157 | </form> |
---|