From 8326991cd2bb943d371ee07726cedebad91a085b Mon Sep 17 00:00:00 2001 From: lsces Date: Mon, 6 Aug 2012 18:43:04 +0100 Subject: Complete role model support in theme management --- templates/admin_layout.tpl | 60 ++++++++++++++++++++++++++----------- templates/admin_layout_overview.tpl | 6 +++- 2 files changed, 47 insertions(+), 19 deletions(-) (limited to 'templates') diff --git a/templates/admin_layout.tpl b/templates/admin_layout.tpl index 484b2b4..9ad0682 100644 --- a/templates/admin_layout.tpl +++ b/templates/admin_layout.tpl @@ -206,15 +206,27 @@
- {formlabel label="Groups" for="groups"} - {forminput} - - {formhelp note="Select the groups of users who can see this module. If you select no group, the module will be visible to all users."} - {/forminput} + {if $roles } + {formlabel label="Roles" for="roles"} + {forminput} + + {formhelp note="Select the roles of users who can see this module. If you select no role, the module will be visible to all users."} + {/forminput} + {else} + {formlabel label="Groups" for="groups"} + {forminput} + + {formhelp note="Select the groups of users who can see this module. If you select no group, the module will be visible to all users."} + {/forminput} + {/if}
@@ -310,15 +322,27 @@
- {formlabel label="Groups" for="c_groups"} - {forminput} - - {formhelp note="Select the groups of users who can see this module. If you select no group, the module will be visible to all users."} - {/forminput} + {if $roles } + {formlabel label="Roles" for="c_roles"} + {forminput} + + {formhelp note="Select the roles of users who can see this module. If you select no role, the module will be visible to all users."} + {/forminput} + {else} + {formlabel label="Groups" for="c_groups"} + {forminput} + + {formhelp note="Select the groups of users who can see this module. If you select no group, the module will be visible to all users."} + {/forminput} + {/if}
diff --git a/templates/admin_layout_overview.tpl b/templates/admin_layout_overview.tpl index 90d18e9..a0682e4 100644 --- a/templates/admin_layout_overview.tpl +++ b/templates/admin_layout_overview.tpl @@ -66,7 +66,11 @@ {section name=ix loop=$layout.$area} - {include file="bitpackage:themes/module_config_inc.tpl" modInfo=$layout.$area[ix]} + {if $roles } + {include file="bitpackage:themes/module_config_role_inc.tpl" modInfo=$layout.$area[ix]} + {else} + {include file="bitpackage:themes/module_config_inc.tpl" modInfo=$layout.$area[ix]} + {/if} {sectionelse} -- cgit v1.3