From 1e83c49c4f35989611ea90f3a048e3c81e03d09b Mon Sep 17 00:00:00 2001 From: Brad Shuttleworth Date: Wed, 12 Jul 2006 16:56:12 +0000 Subject: [PATCH] fix for KTS-1077: no indication of which role is active --- plugins/ktcore/KTPermissions.php | 5 ++++- templates/ktcore/folder/roles_managegroups.smarty | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/ktcore/KTPermissions.php b/plugins/ktcore/KTPermissions.php index 38d0e5f..abbe03d 100644 --- a/plugins/ktcore/KTPermissions.php +++ b/plugins/ktcore/KTPermissions.php @@ -531,7 +531,7 @@ class KTRoleAllocationPlugin extends KTFolderAction { $this->oPage->setBreadcrumbDetails(_kt('Manage Groups for Role')); - $this->oPage->setTitle(sprintf(_kt('Manage Groups for Role'))); + $this->oPage->setTitle(sprintf(_kt('Manage Groups for Role "%s"'), $oRole->getName())); $initJS = 'var optGroup = new OptionTransfer("groupSelect","chosenGroups"); ' . 'function startTrans() { var f = getElement("grouproleform"); ' . @@ -556,6 +556,8 @@ class KTRoleAllocationPlugin extends KTFolderAction { } } + $oRole = Role::get($oRoleAllocation->getRoleId()); + $oTemplating =& KTTemplating::getSingleton(); $oTemplate = $oTemplating->loadTemplate("ktcore/folder/roles_managegroups"); $aTemplateData = array( @@ -563,6 +565,7 @@ class KTRoleAllocationPlugin extends KTFolderAction { "edit_rolealloc" => $oRoleAllocation, 'unused_groups' => $aFreeUsers, 'role_groups' => $aRoleUsers, + 'rolename' => $oRole->getName(), ); return $oTemplate->render($aTemplateData); } diff --git a/templates/ktcore/folder/roles_managegroups.smarty b/templates/ktcore/folder/roles_managegroups.smarty index 1f4b442..bfd4537 100644 --- a/templates/ktcore/folder/roles_managegroups.smarty +++ b/templates/ktcore/folder/roles_managegroups.smarty @@ -1,4 +1,4 @@ -

{i18n}Allocate Groups to Role{/i18n}

+

{i18n arg_rolename=$rolename}Allocate Groups to Role: #rolename#{/i18n}

{$context->oPage->requireJSResource('thirdpartyjs/OptionTransfer.js')} {$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Base.js')} @@ -17,7 +17,7 @@
- {i18n}Allocate Groups to Role{/i18n} + {i18n}Allocate Groups{/i18n}

{i18n}Select the groups which should be part of this role.{/i18n}

-- libgit2 0.21.4