svn commit: r741439 - in /ofbiz/trunk: framework/common/webcommon/WEB-INF/actions/includes/ framework/common/widget/ framework/example/widget/example/ specialpurpose/myportal/data/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r741439 - in /ofbiz/trunk: framework/common/webcommon/WEB-INF/actions/includes/ framework/common/widget/ framework/example/widget/example/ specialpurpose/myportal/data/

hansbak-2
Author: hansbak
Date: Fri Feb  6 06:59:53 2009
New Revision: 741439

URL: http://svn.apache.org/viewvc?rev=741439&view=rev
Log:
make example dashboard working again with the recent portal page changes and removed fulladmin pages from myportal because not required

Modified:
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
    ofbiz/trunk/framework/common/widget/PortalPageForms.xml
    ofbiz/trunk/framework/example/widget/example/CommonScreens.xml
    ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy?rev=741439&r1=741438&r2=741439&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy Fri Feb  6 06:59:53 2009
@@ -29,11 +29,17 @@
                   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 (portalMainPages) {
         parameters.portalPageId = portalMainPages.get(0).portalPageId;
     }
+
+    if(!parameters.portalPageId){
+     parameters.portalPageId = userLoginSecurityGroupId;
+    }
     
     ppCond =
             EntityCondition.makeCondition([

Modified: ofbiz/trunk/framework/common/widget/PortalPageForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageForms.xml?rev=741439&r1=741438&r2=741439&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/PortalPageForms.xml (original)
+++ ofbiz/trunk/framework/common/widget/PortalPageForms.xml Fri Feb  6 06:59:53 2009
@@ -50,18 +50,18 @@
         </field>
         <field name="originalPortalPageId"><display-entity entity-name="PortalPage" description="${portalPageName} [${portalPageId}]" key-field-name="portalPageId"/></field>
         <field name="deleteLink" use-when="!ownerUserLoginId.equals(&quot;_NA_&quot;)" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" >
-            <hyperlink target="deletePortalPage?portalPageId=${portalPageId}&amp;parentPortalPageId=${parameters.parentPortalPageId}" description="${uiLabelMap.CommonDelete}"/>
+            <hyperlink target="deletePortalPage?portalPageId=${portalPageId}&amp;parentPortalPageId=${parameters.portalPageId}" description="${uiLabelMap.CommonDelete}"/>
         </field>
         <field name="deleteLink" use-when="!ownerUserLoginId.equals(&quot;_NA_&quot;)&amp;&amp;originalPortalPageId!=null" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" >
-            <hyperlink target="deletePortalPage?portalPageId=${portalPageId}&amp;parentPortalPageId=${parameters.parentPortalPageId}" description="${uiLabelMap.CommonRevertPortalPage}"/>
+            <hyperlink target="deletePortalPage?portalPageId=${portalPageId}&amp;parentPortalPageId=${parameters.portalPageId}" description="${uiLabelMap.CommonRevertPortalPage}"/>
         </field>
     </form>
     
-    <form name="NewPortalPage" type="single" target="createPortalPage?mainPortalPageId=${parameters.mainPortalPageId}">
+    <form name="NewPortalPage" type="single" target="createPortalPage?mainPortalPageId=${parameters.portalPageId}">
         <actions>
             <script location="component://common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy"/>
         </actions>
-        <field name="parentPortalPageId"><hidden value="${userLoginSecurityGroupId}"/></field>
+        <field name="parentPortalPageId"><hidden value="${parameters.portalPageId}"/></field>
         <field name="portalPageName" parameter-name="portalPageName"><text/></field>
         <field name="description"><text/></field>
         <field name="submitButton" title="${uiLabelMap.CommonCreate}"><submit button-type="button"/></field>

Modified: ofbiz/trunk/framework/example/widget/example/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/CommonScreens.xml?rev=741439&r1=741438&r2=741439&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/CommonScreens.xml Fri Feb  6 06:59:53 2009
@@ -178,6 +178,10 @@
             in OFBiz is to have each component include a Main page as a starting point for
             the user. -->
         <section>
+            <actions>
+                <set field="parameters.portalPageId" value="EXAMPLE"/>
+                <script location="component://common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy"/>
+            </actions>
             <widgets>
                  <include-screen name="FindExample" location="component://example/widget/example/ExampleScreens.xml"/>
             </widgets>

Modified: ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml?rev=741439&r1=741438&r2=741439&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml Fri Feb  6 06:59:53 2009
@@ -30,14 +30,6 @@
     <!-- no security group -->
     <PortalPage portalPageId="MYPORTAL_NONE" portalPageName="Main" description="The default OFBiz portal page" ownerUserLoginId="_NA_"/>
     
-    <PortalPage portalPageId="MYPORTAL_ADMIN" portalPageName="Main" description="The default OFBiz portal page" ownerUserLoginId="_NA_" securityGroupId="FULLADMIN"/>
-    <PortalPage portalPageId="MYPORTAL_ADMIN1" sequenceNum="01" portalPageName="My Profile" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_ADMIN"/>
-    <PortalPage portalPageId="MYPORTAL_ADMIN2" sequenceNum="02" portalPageName="My Communications" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_ADMIN"/>
-    <PortalPage portalPageId="MYPORTAL_ADMIN3" sequenceNum="03" portalPageName="Other Communications" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_ADMIN"/>
-    <PortalPage portalPageId="MYPORTAL_ADMIN4" sequenceNum="04" portalPageName="Company communications" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_ADMIN"/>
-    <PortalPage portalPageId="MYPORTAL_ADMIN5" sequenceNum="05" portalPageName="My Time Sheets" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_ADMIN"/>
-    <PortalPage portalPageId="MYPORTAL_ADMIN6" sequenceNum="06" portalPageName="My Tasks" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_ADMIN"/>
-    
     <PortalPage portalPageId="MYPORTAL_EMPLOYEE" portalPageName="Main" description="The default OFBiz portal page" ownerUserLoginId="_NA_" securityGroupId="MYPORTAL_EMPLOYEE" />
     <PortalPage portalPageId="MYPORTAL_EMPLOYEE1" sequenceNum="01" portalPageName="My Profile" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPLOYEE"/>
     <PortalPage portalPageId="MYPORTAL_EMPLOYEE2" sequenceNum="02" portalPageName="My Communications" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPLOYEE"/>
@@ -53,15 +45,6 @@
     
     <PortalPageColumn portalPageId="MYPORTAL_NONE" columnSeqId="00001" />
     
-    <PortalPageColumn portalPageId="MYPORTAL_ADMIN" columnSeqId="00001" />
-    <PortalPageColumn portalPageId="MYPORTAL_ADMIN1" columnSeqId="00001" columnWidthPercentage="50" />
-    <PortalPageColumn portalPageId="MYPORTAL_ADMIN1" columnSeqId="00002" columnWidthPercentage="50" />
-    <PortalPageColumn portalPageId="MYPORTAL_ADMIN2" columnSeqId="00001" />
-    <PortalPageColumn portalPageId="MYPORTAL_ADMIN3" columnSeqId="00001" />
-    <PortalPageColumn portalPageId="MYPORTAL_ADMIN4" columnSeqId="00001" />
-    <PortalPageColumn portalPageId="MYPORTAL_ADMIN5" columnSeqId="00001" />
-    <PortalPageColumn portalPageId="MYPORTAL_ADMIN6" columnSeqId="00001" />
-    
     <PortalPageColumn portalPageId="MYPORTAL_EMPLOYEE" columnSeqId="00001" />
     <PortalPageColumn portalPageId="MYPORTAL_EMPLOYEE1" columnSeqId="00001" columnWidthPercentage="50" />
     <PortalPageColumn portalPageId="MYPORTAL_EMPLOYEE1" columnSeqId="00002" columnWidthPercentage="50" />
@@ -105,25 +88,6 @@
     
     <PortalPagePortlet portalPageId="MYPORTAL_NONE" portalPortletId="party" portletSeqId="00001" columnSeqId="00001" sequenceNum="0" />
     
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN" portalPortletId="listrequestlist" portletSeqId="00001" columnSeqId="00001" />    
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="party" portletSeqId="00001" columnSeqId="00001" sequenceNum="0" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="contact" portletSeqId="00001" columnSeqId="00001" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="LoyaltyPoints" portletSeqId="00001" columnSeqId="00001" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="PaymentMethods" portletSeqId="00001" columnSeqId="00001" sequenceNum="4" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="AvsSettings" portletSeqId="00001" columnSeqId="00001" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="UserLogin" portletSeqId="00001" columnSeqId="00002" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="Attributes" portletSeqId="00001" columnSeqId="00002" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="Visits" portletSeqId="00001" columnSeqId="00002" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="Content" portletSeqId="00001" columnSeqId="00002" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="ShipperAccount" portletSeqId="00001" columnSeqId="00002" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="Notes" portletSeqId="00001" columnSeqId="00002" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN1" portalPortletId="MYTASKSPARTY" portletSeqId="00001" columnSeqId="00002" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN2" portalPortletId="mycommunications" portletSeqId="00001" columnSeqId="00001" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN3" portalPortletId="otherCommunications" portletSeqId="00001" columnSeqId="00001" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN4" portalPortletId="mycompanycomms" portletSeqId="00001" columnSeqId="00001" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN5" portalPortletId="mytimesheet" portletSeqId="00001" columnSeqId="00001" />
-    <PortalPagePortlet portalPageId="MYPORTAL_ADMIN6" portalPortletId="mytasks" portletSeqId="00001" columnSeqId="00001" />
-    
     <PortalPagePortlet portalPageId="MYPORTAL_EMPLOYEE" portalPortletId="listrequestlist" portletSeqId="00001" columnSeqId="00001" />    
     <PortalPagePortlet portalPageId="MYPORTAL_EMPLOYEE1" portalPortletId="party" portletSeqId="00001" columnSeqId="00001" sequenceNum="0" />
     <PortalPagePortlet portalPageId="MYPORTAL_EMPLOYEE1" portalPortletId="contact" portletSeqId="00001" columnSeqId="00001" />