diff options
author | plegall <plg@piwigo.org> | 2012-03-17 00:47:17 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2012-03-17 00:47:17 +0000 |
commit | b09c66fdc3aedc5d09a8b082facbf58f5b5e0478 (patch) | |
tree | b7c1ff0637f044248c284f8a2da3f1edc9d4427d /admin/themes/default/template/cat_perm.tpl | |
parent | f3e2beed8cd7e3042b2d82ad9c6efc012a32fe13 (diff) |
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.
git-svn-id: http://piwigo.org/svn/trunk@13580 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default/template/cat_perm.tpl')
-rw-r--r-- | admin/themes/default/template/cat_perm.tpl | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/admin/themes/default/template/cat_perm.tpl b/admin/themes/default/template/cat_perm.tpl index c44d918ae..728669894 100644 --- a/admin/themes/default/template/cat_perm.tpl +++ b/admin/themes/default/template/cat_perm.tpl @@ -1,9 +1,62 @@ +{combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'} +{combine_css path="themes/default/js/plugins/chosen.css"} + +{footer_script}{literal} +jQuery(document).ready(function() { + jQuery(".chzn-select").chosen(); + + 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(); + }); +}); +{/literal}{/footer_script} + <div class="titrePage"> <h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> › {'Edit album'|@translate} {$TABSHEET_TITLE}</h2> </div> <form action="{$F_ACTION}" method="post" id="categoryPermissions"> +<fieldset> + <legend>{'Access type'|@translate}</legend> + + <p id="selectStatus"> + <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> + <br> + <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> + </p> +</fieldset> + +<fieldset id="privateOptions"> + <legend>{'Groups and users'|@translate}</legend> + + <p> + <strong>{'Permission granted for groups'|@translate}</strong> + <br> + <select data-placeholder="{'Select groups...'|@translate}" class="chzn-select" multiple style="width:700px;" name="groups[]"> + {html_options options=$groups selected=$groups_selected} + </select> + </p> + + <p> + <strong>{'Permission granted for users'|@translate}</strong> + <br> + <select data-placeholder="{'Select users...'|@translate}" class="chzn-select" multiple style="width:700px;" name="users[]"> + {html_options options=$users selected=$users_selected} + </select> + </p> + +{* <h4>{'Groups'|@translate}</h4> <fieldset> @@ -60,6 +113,13 @@ <input class="submit" type="submit" name="grant_users_submit" value="{'Grant selected users'|@translate}"> <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label> </fieldset> +*} +</fieldset> + + <p style="margin:12px;text-align:left;"> + <input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit"> + <label id="applytoSubAction" style="display:none;"><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label> + </p> <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> </form> |