source: trunk/admin/themes/default/template/cat_perm.tpl @ 13580

Last change on this file since 13580 was 13580, checked in by plg, 12 years ago

feature 2594: redesign on album permission screen. The choice "public/private"
is not on the "properties" tab anymore. Simpler ergonomy to select grant users
and groups.

  • Property svn:eol-style set to LF
File size: 4.5 KB
RevLine 
[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}
5jQuery(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  });
21});
22{/literal}{/footer_script}
23
[2531]24<div class="titrePage">
[13013]25  <h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
[2531]26</div>
27
28<form action="{$F_ACTION}" method="post" id="categoryPermissions">
29
[13580]30<fieldset>
31  <legend>{'Access type'|@translate}</legend>
32
33  <p id="selectStatus">
34    <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>
35    <br>
36    <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>
37  </p>
38</fieldset>
39
40<fieldset id="privateOptions">
41  <legend>{'Groups and users'|@translate}</legend>
42
43  <p>
44    <strong>{'Permission granted for groups'|@translate}</strong>
45    <br>
46    <select data-placeholder="{'Select groups...'|@translate}" class="chzn-select" multiple style="width:700px;" name="groups[]">
47      {html_options options=$groups selected=$groups_selected}
48    </select>
49  </p>
50
51  <p>
52    <strong>{'Permission granted for users'|@translate}</strong>
53    <br>
54    <select data-placeholder="{'Select users...'|@translate}" class="chzn-select" multiple style="width:700px;" name="users[]">
55      {html_options options=$users selected=$users_selected}
56    </select>
57  </p>
58
59{*
[2531]60  <h4>{'Groups'|@translate}</h4>
61
62  <fieldset>
63    <legend>{'Permission granted'|@translate}</legend>
64    <ul>
65      {foreach from=$group_granted_ids item=id}
[3185]66      <li><label><input type="checkbox" name="deny_groups[]" value="{$id}"> {$all_groups[$id]}</label></li>
[2531]67      {/foreach}
68    </ul>
[8128]69    <input class="submit" type="submit" name="deny_groups_submit" value="{'Deny selected groups'|@translate}">
[2531]70  </fieldset>
71
72  <fieldset>
73    <legend>{'Permission denied'|@translate}</legend>
74    <ul>
75      {foreach from=$group_denied_ids item=id}
76      <li><label><input type="checkbox" name="grant_groups[]" value="{$id}"> {$all_groups[$id]}</label></li>
77      {/foreach}
78    </ul>
[12825]79    <input class="submit" type="submit" name="grant_groups_submit" value="{'Grant selected groups'|@translate}">
[12018]80    <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label>
[2531]81  </fieldset>
82
83  <h4>{'Users'|@translate}</h4>
84
85  <fieldset>
86    <legend>{'Permission granted'|@translate}</legend>
87    <ul>
88      {foreach from=$user_granted_direct_ids item=id}
[3185]89      <li><label><input type="checkbox" name="deny_users[]" value="{$id}"> {$all_users[$id]}</label></li>
[2531]90      {/foreach}
91    </ul>
[8128]92    <input class="submit" type="submit" name="deny_users_submit" value="{'Deny selected users'|@translate}">
[2531]93  </fieldset>
94
95  <fieldset>
96    <legend>{'Permission granted thanks to a group'|@translate}</legend>
97    {if isset($user_granted_indirects) }
98    <ul>
99      {foreach from=$user_granted_indirects item=user_group}
100      <li>{$user_group.USER} ({$user_group.GROUP})</li>
101      {/foreach}
102    </ul>
103    {/if}
104  </fieldset>
105
106  <fieldset>
107    <legend>{'Permission denied'|@translate}</legend>
108    <ul>
109      {foreach from=$user_denied_ids item=id}
110      <li><label><input type="checkbox" name="grant_users[]" value="{$id}"> {$all_users[$id]}</label></li>
111      {/foreach}
112    </ul>
[12825]113    <input class="submit" type="submit" name="grant_users_submit" value="{'Grant selected users'|@translate}">
[12019]114    <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label>
[2531]115  </fieldset>
[13580]116*}
117</fieldset>
[2531]118
[13580]119  <p style="margin:12px;text-align:left;">
120    <input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
121    <label id="applytoSubAction" style="display:none;"><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label>
122  </p>
123
[12020]124<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
[2531]125</form>
Note: See TracBrowser for help on using the repository browser.