diff options
| author | lsces <lester@lsces.co.uk> | 2012-08-06 18:43:04 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2012-08-06 18:43:04 +0100 |
| commit | 8326991cd2bb943d371ee07726cedebad91a085b (patch) | |
| tree | 25f9bd668bc5ae4b015ac03d04d9e89c4919b6b2 /templates | |
| parent | e9e19c996ef22c3535bf34822fde69c3e094c5b0 (diff) | |
| download | themes-8326991cd2bb943d371ee07726cedebad91a085b.tar.gz themes-8326991cd2bb943d371ee07726cedebad91a085b.tar.bz2 themes-8326991cd2bb943d371ee07726cedebad91a085b.zip | |
Complete role model support in theme management
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin_layout.tpl | 60 | ||||
| -rw-r--r-- | templates/admin_layout_overview.tpl | 6 |
2 files changed, 47 insertions, 19 deletions
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 @@ </div> <div class="row"> - {formlabel label="Groups" for="groups"} - {forminput} - <select multiple="multiple" size="5" name="groups[]" id="groups"> - {foreach from=$groups key=groupId item=group} - <option value="{$groupId}" {if $group.selected eq 'y'}selected="selected"{/if}>{$group.group_name}</option> - {/foreach} - </select> - {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} + <select multiple="multiple" size="5" name="roles[]" id="roles"> + {foreach from=$roles key=roleId item=role} + <option value="{$roleId}" {if $role.selected eq 'y'}selected="selected"{/if}>{$role.role_name}</option> + {/foreach} + </select> + {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} + <select multiple="multiple" size="5" name="groups[]" id="groups"> + {foreach from=$groups key=groupId item=group} + <option value="{$groupId}" {if $group.selected eq 'y'}selected="selected"{/if}>{$group.group_name}</option> + {/foreach} + </select> + {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} </div> <div class="row"> @@ -310,15 +322,27 @@ </div> <div class="row"> - {formlabel label="Groups" for="c_groups"} - {forminput} - <select multiple="multiple" size="5" name="groups[]" id="c_groups"> - {foreach from=$groups key=groupId item=group} - <option value="{$groupId}" {if $group.selected eq 'y'}selected="selected"{/if}>{$group.group_name}</option> - {/foreach} - </select> - {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} + <select multiple="multiple" size="5" name="roles[]" id="c_roles"> + {foreach from=$roles key=roleId item=role} + <option value="{$roleId}" {if $role.selected eq 'y'}selected="selected"{/if}>{$role.role_name}</option> + {/foreach} + </select> + {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} + <select multiple="multiple" size="5" name="groups[]" id="c_groups"> + {foreach from=$groups key=groupId item=group} + <option value="{$groupId}" {if $group.selected eq 'y'}selected="selected"{/if}>{$group.group_name}</option> + {/foreach} + </select> + {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} </div> <div class="row submit"> 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} <tr> <td> - {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} </td> </tr> {sectionelse} |
