From: <gem...@li...> - 2011-12-19 15:01:08
|
Revision: 374 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=374&view=rev Author: mennodekker Date: 2011-12-19 15:00:59 +0000 (Mon, 19 Dec 2011) Log Message: ----------- All overview screens (period, token, patient) now show organization dropdown when more than one is allowed - removing pr.plan.choose-org Modified Paths: -------------- trunk/library/classes/Gems/Default/TokenPlanAction.php trunk/library/classes/Gems/Menu.php Modified: trunk/library/classes/Gems/Default/TokenPlanAction.php =================================================================== --- trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-12-19 12:39:13 UTC (rev 373) +++ trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-12-19 15:00:59 UTC (rev 374) @@ -340,10 +340,13 @@ ORDER BY ggp_name"; $elements[] = $this->_createSelectElement('gsu_id_primary_group', $sql, $this->_('(all fillers)')); - if (($this->escort instanceof Gems_Project_Organization_MultiOrganizationInterface) && - $this->escort->hasPrivilege('pr.plan.choose-org')){ - // Select organisation - $options = $this->util->getDbLookup()->getOrganizationsWithRespondents(); + // Select organisation + if (($this->escort instanceof Gems_Project_Organization_MultiOrganizationInterface)) { + $availableOrganizations = $this->util->getDbLookup()->getOrganizationsWithRespondents(); + $allowedOrganizations = $this->loader->getCurrentUser()->getAllowedOrganizations(); + + $options = array_intersect($availableOrganizations, $allowedOrganizations); + $elements[] = $this->_createSelectElement('gto_id_organization', $options); } Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2011-12-19 12:39:13 UTC (rev 373) +++ trunk/library/classes/Gems/Menu.php 2011-12-19 15:00:59 UTC (rev 374) @@ -551,7 +551,7 @@ $this->addContactPage($this->_('Contact')); // Privileges not associated with menu item - $this->addHiddenPrivilige('pr.plan.choose-org'); + //$this->addHiddenPrivilige('pr.plan.choose-org'); $this->addHiddenPrivilige('pr.plan.mail-as-application'); $this->addHiddenPrivilige('pr.respondent.result'); $this->addHiddenPrivilige('pr.respondent.who'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |