From 9ea7eebcc073b237148b44b6d9c7c261b23e71ea Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Fri, 6 Feb 2009 06:59:53 +0000 Subject: [PATCH] make example dashboard working again with the recent portal page changes and removed fulladmin pages from myportal because not required git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@741439 13f79535-47bb-0310-9956-ffa450edef68 --- .../actions/includes/ListPortalPages.groovy | 14 ++++++-- framework/common/widget/PortalPageForms.xml | 8 ++--- .../example/widget/example/CommonScreens.xml | 4 +++ .../myportal/data/MyPortalTypeData.xml | 36 ------------------- 4 files changed, 20 insertions(+), 42 deletions(-) diff --git a/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy b/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy index 5e9a401c04..ec6514f38c 100644 --- a/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy +++ b/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy @@ -29,11 +29,17 @@ if (parameters.userLogin) { EntityCondition.makeCondition("userLoginId", EntityOperator.EQUALS, parameters.userLogin.userLoginId) ],EntityOperator.AND); userLoginSecurityGroups = delegator.findList("UserLoginSecurityGroup", condSec, null, null, null, false); - + if (UtilValidate.isNotEmpty(userLoginSecurityGroups)) { userLoginSecurityGroupId = userLoginSecurityGroups.get(0).get("groupId"); } - + + if(!userLoginSecurityGroupId){ + parameters.portalPageId = parameters.parentPortalPageId; + }else{ + parameters.parentPortalPageId = userLoginSecurityGroupId; + } + //get the portal page cond1 = EntityCondition.makeCondition([ EntityCondition.makeCondition("portalPageId", EntityOperator.LIKE, parameters.parentPortalPageId + "%"), @@ -45,6 +51,10 @@ if (parameters.userLogin) { if (portalMainPages) { parameters.portalPageId = portalMainPages.get(0).portalPageId; } + + if(!parameters.portalPageId){ + parameters.portalPageId = userLoginSecurityGroupId; + } ppCond = EntityCondition.makeCondition([ diff --git a/framework/common/widget/PortalPageForms.xml b/framework/common/widget/PortalPageForms.xml index c261f44fff..7e2da80b5e 100644 --- a/framework/common/widget/PortalPageForms.xml +++ b/framework/common/widget/PortalPageForms.xml @@ -50,18 +50,18 @@ under the License. - + - + -
+