Commit 1e83c49c4f35989611ea90f3a048e3c81e03d09b

Authored by Brad Shuttleworth
1 parent 405aff38

fix for KTS-1077: no indication of which role is active



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5684 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktcore/KTPermissions.php
@@ -531,7 +531,7 @@ class KTRoleAllocationPlugin extends KTFolderAction { @@ -531,7 +531,7 @@ class KTRoleAllocationPlugin extends KTFolderAction {
531 531
532 532
533 $this->oPage->setBreadcrumbDetails(_kt('Manage Groups for Role')); 533 $this->oPage->setBreadcrumbDetails(_kt('Manage Groups for Role'));
534 - $this->oPage->setTitle(sprintf(_kt('Manage Groups for Role'))); 534 + $this->oPage->setTitle(sprintf(_kt('Manage Groups for Role "%s"'), $oRole->getName()));
535 535
536 $initJS = 'var optGroup = new OptionTransfer("groupSelect","chosenGroups"); ' . 536 $initJS = 'var optGroup = new OptionTransfer("groupSelect","chosenGroups"); ' .
537 'function startTrans() { var f = getElement("grouproleform"); ' . 537 'function startTrans() { var f = getElement("grouproleform"); ' .
@@ -556,6 +556,8 @@ class KTRoleAllocationPlugin extends KTFolderAction { @@ -556,6 +556,8 @@ class KTRoleAllocationPlugin extends KTFolderAction {
556 } 556 }
557 } 557 }
558 558
  559 + $oRole = Role::get($oRoleAllocation->getRoleId());
  560 +
559 $oTemplating =& KTTemplating::getSingleton(); 561 $oTemplating =& KTTemplating::getSingleton();
560 $oTemplate = $oTemplating->loadTemplate("ktcore/folder/roles_managegroups"); 562 $oTemplate = $oTemplating->loadTemplate("ktcore/folder/roles_managegroups");
561 $aTemplateData = array( 563 $aTemplateData = array(
@@ -563,6 +565,7 @@ class KTRoleAllocationPlugin extends KTFolderAction { @@ -563,6 +565,7 @@ class KTRoleAllocationPlugin extends KTFolderAction {
563 "edit_rolealloc" => $oRoleAllocation, 565 "edit_rolealloc" => $oRoleAllocation,
564 'unused_groups' => $aFreeUsers, 566 'unused_groups' => $aFreeUsers,
565 'role_groups' => $aRoleUsers, 567 'role_groups' => $aRoleUsers,
  568 + 'rolename' => $oRole->getName(),
566 ); 569 );
567 return $oTemplate->render($aTemplateData); 570 return $oTemplate->render($aTemplateData);
568 } 571 }
templates/ktcore/folder/roles_managegroups.smarty
1 -<h2>{i18n}Allocate Groups to Role{/i18n}</h2> 1 +<h2>{i18n arg_rolename=$rolename}Allocate Groups to Role: #rolename#{/i18n}</h2>
2 2
3 {$context->oPage->requireJSResource('thirdpartyjs/OptionTransfer.js')} 3 {$context->oPage->requireJSResource('thirdpartyjs/OptionTransfer.js')}
4 {$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Base.js')} 4 {$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Base.js')}
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 17
18 18
19 <fieldset> 19 <fieldset>
20 - <legend>{i18n}Allocate Groups to Role{/i18n}</legend> 20 + <legend>{i18n}Allocate Groups{/i18n}</legend>
21 <p class="descriptiveText">{i18n}Select the groups which should be part of this role.{/i18n}</p> 21 <p class="descriptiveText">{i18n}Select the groups which should be part of this role.{/i18n}</p>
22 22
23 <table border="0" width="600"> 23 <table border="0" width="600">