diff options
author | plegall <plg@piwigo.org> | 2005-06-30 21:20:06 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2005-06-30 21:20:06 +0000 |
commit | 315f9c5670b631fcc279c4d6ac00ae9386d67455 (patch) | |
tree | 52d7f35462240d58c6cbc1399a40ee82a9980915 /template | |
parent | 3e1604f74840f40c7c3b5707256fd99a5ece34bc (diff) |
- category permissions management comes back! (it disappeared in branch 1.4)
This time, it is designed to support better long users list. On this
screen, for a particular category, admin can say which groups and users
are permitted.
git-svn-id: http://piwigo.org/svn/trunk@800 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'template')
-rw-r--r-- | template/default/admin/cat_list.tpl | 3 | ||||
-rw-r--r-- | template/default/admin/cat_perm.tpl | 56 | ||||
-rw-r--r-- | template/default/admin/cat_perm.vtp | 48 | ||||
-rw-r--r-- | template/default/default.css | 5 | ||||
-rw-r--r-- | template/default/theme/category_permissions.png | bin | 0 -> 1838 bytes |
5 files changed, 64 insertions, 48 deletions
diff --git a/template/default/admin/cat_list.tpl b/template/default/admin/cat_list.tpl index 7463845ce..c3973b003 100644 --- a/template/default/admin/cat_list.tpl +++ b/template/default/admin/cat_list.tpl @@ -14,6 +14,9 @@ <li><a href="{category.elements.URL}" title="{lang:manage category elements}"><img src="./template/default/theme/category_elements.png" alt="{lang:elements}" /></a></li> <!-- END elements --> <li><a href="{category.U_CHILDREN}" title="{lang:manage sub-categories}"><img src="./template/default/theme/category_children.png" alt="{lang:sub-categories}" /></a></li> + <!-- BEGIN permissions --> + <li><a href="{category.permissions.URL}" title="{lang:edit category permissions}" ><img src="./template/default/theme/category_permissions.png" alt="{lang:permissions}" /></a></li> + <!-- END permissions --> <!-- BEGIN delete --> <li><a href="{category.delete.URL}" title="{lang:delete category}"><img src="./template/default/theme/category_delete.png" alt="{lang:delete}" /></a></li> <!-- END delete --> diff --git a/template/default/admin/cat_perm.tpl b/template/default/admin/cat_perm.tpl new file mode 100644 index 000000000..6b7061c65 --- /dev/null +++ b/template/default/admin/cat_perm.tpl @@ -0,0 +1,56 @@ +<form action="{F_ACTION}" method="post" id="categoryPermissions"> + + <h2>{lang:Groups}</h2> + + <fieldset> + <legend>{lang:Permission granted}</legend> + <ul> + <!-- BEGIN group_granted --> + <li><label><input type="checkbox" name="deny_groups[]" value="{group_granted.ID}" /> {group_granted.NAME}</label></li> + <!-- END group_granted --> + </ul> + <input type="submit" name="deny_groups_submit" value="{lang:Deny selected groups}" /> + </fieldset> + + <fieldset> + <legend>{lang:Permission denied}</legend> + <ul> + <!-- BEGIN group_denied --> + <li><label><input type="checkbox" name="grant_groups[]" value="{group_denied.ID}"> {group_denied.NAME}</label></li> + <!-- END group_denied --> + </ul> + <input type="submit" name="grant_groups_submit" value="{lang:Grant selected groups}" /> + </fieldset> + + <h2>{lang:Users}</h2> + + <fieldset> + <legend>{lang:Permission granted}</legend> + <ul> + <!-- BEGIN user_granted --> + <li><label><input type="checkbox" name="deny_users[]" value="{user_granted.ID}" /> {user_granted.NAME}</label></li> + <!-- END user_granted --> + </ul> + <input type="submit" name="deny_users_submit" value="{lang:Deny selected users}" /> + </fieldset> + + <fieldset> + <legend>{lang:Permission granted thanks to a group}</legend> + <ul> + <!-- BEGIN user_granted_indirect --> + <li>{user_granted_indirect.NAME} ({user_granted_indirect.GROUP})</li> + <!-- END user_granted_indirect --> + </ul> + </fieldset> + + <fieldset> + <legend>{lang:Permission denied}</legend> + <ul> + <!-- BEGIN user_denied --> + <li><label><input type="checkbox" name="grant_users[]" value="{user_denied.ID}"> {user_denied.NAME}</label></li> + <!-- END user_denied --> + </ul> + <input type="submit" name="grant_users_submit" value="{lang:Grant selected users}" /> + </fieldset> + +</form> diff --git a/template/default/admin/cat_perm.vtp b/template/default/admin/cat_perm.vtp deleted file mode 100644 index 77987fac4..000000000 --- a/template/default/admin/cat_perm.vtp +++ /dev/null @@ -1,48 +0,0 @@ -<form action="{#action}" method="post"> - <!--VTP_groups--> - <table style="width:100%;"> - <tr> - <th colspan="2">{#menu_groups}</th> - </tr> - <!--VTP_group--> - <tr> - <td><img src="./template/{#user_template}/admin/images/puce.gif" alt=">" /><a href="{#group_perm_link}"><span style="color:{#color}">{#groupname}</span></a></td> - <td style="text-align:right;"> - <input type="radio" name="groupaccess-{#id}" value="0"{#authorized_checked}/>{#permuser_authorized} - <input type="radio" name="groupaccess-{#id}" value="1"{#forbidden_checked}/>{#permuser_forbidden} - </td> - </tr> - <!--/VTP_group--> - </table> - <!--/VTP_groups--> - <table style="width:100%;"> - <tr> - <th colspan="2">{#menu_users}</th> - </tr> - <!--VTP_user--> - <tr> - <td> - <img src="./template/{#user_template}/admin/images/puce.gif" alt=">" /> - <a href="{#user_perm_link}"><span style="color:{#color}">{#username}</span></a> - <!--VTP_usergroups--> - [ - <!--VTP_usergroup--> - <span style="color:{#color};">{#name}</span>{#separation} - <!--/VTP_usergroup--> - ] - <!--/VTP_usergroups--> - </td> - <td style="text-align:right;"> - <!--VTP_parent_forbidden--> - <a href="{#url}">{#permuser_parent_forbidden}</a> - <!--/VTP_parent_forbidden--> - <input type="radio" name="useraccess-{#id}" value="0"{#authorized_checked}/>{#permuser_authorized} - <input type="radio" name="useraccess-{#id}" value="1"{#forbidden_checked}/>{#permuser_forbidden} - </td> - </tr> - <!--/VTP_user--> - <tr> - <td colspan="2" align="center"><input type="submit" name="submit" value="{#submit}"/></td> - </tr> - </table> -</form>
\ No newline at end of file diff --git a/template/default/default.css b/template/default/default.css index fa9286407..5ec9a6921 100644 --- a/template/default/default.css +++ b/template/default/default.css @@ -475,3 +475,8 @@ form.filter FIELDSET { form.filter FIELDSET + INPUT { margin-top: 10px; } + +FORM#categoryPermissions LI { + display:inline; + white-space: nowrap; +} diff --git a/template/default/theme/category_permissions.png b/template/default/theme/category_permissions.png Binary files differnew file mode 100644 index 000000000..df0459893 --- /dev/null +++ b/template/default/theme/category_permissions.png |