You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/10/20 12:47:56 UTC
svn commit: r1025485 [2/3] - in /ofbiz/branches/jquery: ./
applications/accounting/ applications/accounting/config/
applications/accounting/data/ applications/accounting/entitydef/
applications/accounting/lib/ applications/accounting/script/org/ofbiz/a...
Modified: ofbiz/branches/jquery/applications/workeffort/widget/CalendarScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/workeffort/widget/CalendarScreens.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/workeffort/widget/CalendarScreens.xml (original)
+++ ofbiz/branches/jquery/applications/workeffort/widget/CalendarScreens.xml Wed Oct 20 10:47:53 2010
@@ -25,7 +25,6 @@ under the License.
<section>
<actions>
<property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
- <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
<set field="parameters.period" from-field="parameters.period" default-value="${initialView}"/>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy"/>
<set field="parentTypeId" from-field="parameters.parentTypeId" default-value="EVENT"/><!-- workeffortTypeId parent to ad events -->
@@ -127,7 +126,6 @@ under the License.
<screen name="CalendarWithDecorator"><!-- used within the workeffort component to be able to add and show any workeffort type -->
<section>
<actions>
- <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
<set field="parameters.period" from-field="parameters.period" default-value="${initialView}"/>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy"/>
<set field="titleProperty" value="WorkEffortCalendar"/>
Modified: ofbiz/branches/jquery/framework/common/config/CommonUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/config/CommonUiLabels.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/config/CommonUiLabels.xml (original)
+++ ofbiz/branches/jquery/framework/common/config/CommonUiLabels.xml Wed Oct 20 10:47:53 2010
@@ -195,6 +195,10 @@
<value xml:lang="zh">æ°å»º</value>
<value xml:lang="zh_CN">æ·»å ä¸ä¸ª</value>
</property>
+ <property key="CommonAddAColumnToThisPortalPage">
+ <value xml:lang="en">Add a new column to this portal</value>
+ <value xml:lang="it">Aggiunge una nuova colonna a questa pagina</value>
+ </property>
<property key="CommonAddAPortlet">
<value xml:lang="en">Add A Portlet...</value>
<value xml:lang="fr">Ajouter un portlet...</value>
@@ -264,6 +268,7 @@
<property key="CommonAddPortletToPage">
<value xml:lang="en">Add a portlet to portal page</value>
<value xml:lang="fr">Ajouter une portlet à la page</value>
+ <value xml:lang="it">Aggiunge un portlet in questa colonna</value>
</property>
<property key="CommonAddProblem">
<value xml:lang="ar">Ù
Ø´Ù٠أثÙاء اÙإضاÙØ©</value>
@@ -1913,6 +1918,18 @@
<value xml:lang="zh">å é¤å
¨é¨</value>
<value xml:lang="zh_CN">å é¤ææ</value>
</property>
+ <property key="CommonDeleteColumn">
+ <value xml:lang="en">Delete Column</value>
+ <value xml:lang="it">Elimina colonna</value>
+ </property>
+ <property key="CommonDeleteThisColumn">
+ <value xml:lang="en">Delete this column</value>
+ <value xml:lang="it">Elimina questa colonna</value>
+ </property>
+ <property key="CommonDeleteThisPortlet">
+ <value xml:lang="en">Delete this portlet</value>
+ <value xml:lang="it">Elimina questo portlet</value>
+ </property>
<property key="CommonDepth">
<value xml:lang="ar">عÙ
Ù</value>
<value xml:lang="de">Tiefe</value>
@@ -4396,6 +4413,10 @@
<value xml:lang="th">à¸à¸£à¸§à¸à¸ªà¸à¸à¸£à¸«à¸±à¸ªà¸à¹à¸²à¸à¹à¸«à¸¡à¹</value>
<value xml:lang="zh">æ°å¯ç éªè¯</value>
</property>
+ <property key="CommonNewPortalPage">
+ <value xml:lang="en">New Portal Page</value>
+ <value xml:lang="it">Nuova pagina portale</value>
+ </property>
<property key="CommonNewSelection">
<value xml:lang="ar">إختÙار جدÙد</value>
<value xml:lang="de">Neue Auswahl</value>
@@ -6689,10 +6710,10 @@
<value xml:lang="zh">设置为å½å</value>
</property>
<property key="CommonSetColumnWidth">
- <value xml:lang="en">Set Column Width...</value>
+ <value xml:lang="en">Set Column Width</value>
<value xml:lang="fr">Définir la largeur de colonne ...</value>
<value xml:lang="hi_IN">à¤à¥à¤²à¤® à¤à¥ à¤à¥à¤¡à¤¼à¤¾à¤ सà¥à¤¥à¤¾à¤ªà¤¿à¤¤ à¤à¤°à¥...</value>
- <value xml:lang="it">Larghezza colonna...</value>
+ <value xml:lang="it">Imposta larghezza colonna</value>
<value xml:lang="zh">设置å宽度...</value>
</property>
<property key="CommonSetNowEmpty">
@@ -8988,15 +9009,23 @@
<value xml:lang="zh">ç±ç¨æ·ç»å½æ è¯ä¿®æ¹</value>
</property>
<property key="FormFieldTitle_originalPortalPageId">
- <value xml:lang="en">Original Portal Page Id</value>
+ <value xml:lang="en">original page</value>
+ <value xml:lang="fr">Page d'orig.</value>
<value xml:lang="it">Codice pagina portale originale</value>
</property>
<property key="FormFieldTitle_parentPortalPageId">
- <value xml:lang="en">Parent Portal Page Id</value>
- <value xml:lang="it">Codice pagina portale padre</value>
+ <value xml:lang="en">Parent page</value>
+ <value xml:lang="fr">Page père</value>
+ <value xml:lang="it">Pagina portale padre</value>
+ </property>
+ <property key="FormFieldTitle_portalPageName">
+ <value xml:lang="en">Portal page name</value>
+ <value xml:lang="fr">Nom de page</value>
+ <value xml:lang="it">Nome pagina portale</value>
</property>
<property key="FormFieldTitle_ownerUserLoginId">
<value xml:lang="en">Owner User Login ID</value>
+ <value xml:lang="fr">Propri.</value>
<value xml:lang="it">Codice login proprietario</value>
</property>
<property key="FormFieldTitle_price">
Modified: ofbiz/branches/jquery/framework/common/data/CommonSecurityData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/data/CommonSecurityData.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/data/CommonSecurityData.xml (original)
+++ ofbiz/branches/jquery/framework/common/data/CommonSecurityData.xml Wed Oct 20 10:47:53 2010
@@ -29,6 +29,7 @@
<SecurityPermission description="Update Visual Themes and Visual Theme Resources." permissionId="VISUALTHEME_UPDATE"/>
<SecurityPermission description="Delete Visual Themes and Visual Theme Resources." permissionId="VISUALTHEME_DELETE"/>
<SecurityPermission description="ALL operations on Visual Themes and Visual Theme Resources." permissionId="VISUALTHEME_ADMIN"/>
+ <SecurityPermission description="Admin operations on Portal Pages." permissionId="PORTALPAGE_ADMIN"/>
<SecurityGroupPermission groupId="FLEXADMIN" permissionId="COMMON_CREATE"/>
<SecurityGroupPermission groupId="FLEXADMIN" permissionId="COMMON_DELETE"/>
@@ -37,9 +38,11 @@
<SecurityGroupPermission groupId="FLEXADMIN" permissionId="VISUALTHEME_CREATE"/>
<SecurityGroupPermission groupId="FLEXADMIN" permissionId="VISUALTHEME_UPDATE"/>
<SecurityGroupPermission groupId="FLEXADMIN" permissionId="VISUALTHEME_DELETE"/>
+ <SecurityGroupPermission groupId="FLEXADMIN" permissionId="PORTALPAGE_ADMIN"/>
<SecurityGroupPermission groupId="FULLADMIN" permissionId="VISUALTHEME_ADMIN"/>
<SecurityGroupPermission groupId="FULLADMIN" permissionId="COMMON_ADMIN"/>
+ <SecurityGroupPermission groupId="FULLADMIN" permissionId="PORTALPAGE_ADMIN"/>
<SecurityGroupPermission groupId="VIEWADMIN" permissionId="COMMON_VIEW"/>
Modified: ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/PortalPageMethods.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/PortalPageMethods.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/PortalPageMethods.xml (original)
+++ ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/PortalPageMethods.xml Wed Oct 20 10:47:53 2010
@@ -21,23 +21,6 @@ under the License.
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
- <simple-method method-name="getPortletAttributes" short-description="Get Portlet Attribute Values">
- <call-object-method obj-field="request" method-name="getAttribute" ret-field="portalPageId"><string value="portalPageId"/></call-object-method>
- <call-object-method obj-field="request" method-name="getAttribute" ret-field="portalPortletId"><string value="portalPortletId"/></call-object-method>
- <call-object-method obj-field="request" method-name="getAttribute" ret-field="portletSeqId"><string value="portletSeqId"/></call-object-method>
- <entity-condition entity-name="PortletAttribute" list="portletAttributeList">
- <condition-list combine="and">
- <condition-expr field-name="portalPageId" from-field="portalPageId"/>
- <condition-expr field-name="portalPortletId" from-field="portalPortletId"/>
- <condition-expr field-name="portletSeqId" from-field="portletSeqId"/>
- </condition-list>
- </entity-condition>
- <log level="info" message="portletAttributeList: ${portletAttributeList}"/>
- <iterate entry="portletAttributeList" list="portletAttribute">
- <set field="context.${portletAttribute.attrName}" from-field="portletAttribute.attrValue"/>
- </iterate>
- </simple-method>
-
<simple-method method-name="setPortalPortletAttributes" short-description="Sets a PortalPortlet attributes">
<if-not-empty field="parameters">
<iterate-map map="parameters" key="attributeKey" value="attributeValue">
@@ -84,7 +67,7 @@ under the License.
</simple-method>
<!--Create simple-method of copyOriginalPage-->
- <simple-method method-name="copyIfRequiredSystemPage" short-description="Check if the page is a system page, then copy before allowing the user to copy it">
+ <simple-method method-name="copyIfRequiredSystemPage" short-description="Check if the page is a system page, then copy before allowing the user to edit it">
<entity-one entity-name="PortalPage" value-field="portalPage"/>
<if-compare field="portalPage.ownerUserLoginId" value="_NA_" operator="equals">
<!-- check if private page already created -->
@@ -113,7 +96,7 @@ under the License.
<!--Duplicate content of portalPage, portalPageColumn, portalPagePortlet, portletAttribute,
this method should be call with portalpageId and portalPage in context-->
<simple-method method-name="duplicatePortalPageDetails" short-description="Duplicate content of portalPage, portalPageColumn, portalPagePortlet, portletAttribute">
- <log level="info" message="duplicate portalPage detail from portalPageId ${parameters.portalPageId} to new protalPageId=${portalPageId}"/>
+ <log level="info" message="duplicate portalPage detail from portalPageId ${parameters.portalPageId} to new portalPageId=${portalPageId}"/>
<if-not-empty field="portalPageId">
<!-- delete the columns -->
Modified: ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/PortalPageServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/PortalPageServices.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/PortalPageServices.xml (original)
+++ ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/PortalPageServices.xml Wed Oct 20 10:47:53 2010
@@ -133,8 +133,6 @@ under the License.
<make-next-seq-id value-field="newPortalPage" seq-field-name="sequenceNum"/>
</if-empty>
<create-value value-field="newPortalPage"/>
- <set field="newPortalPageColumn.portalPageId" from-field="newPortalPage.portalPageId"/>
- <call-service service-name="addPortalPageColumn" in-map-name="newPortalPageColumn"/>
<field-to-result field="newPortalPage.portalPageId" result-name="portalPageId"/>
</if-not-empty>
</simple-method>
@@ -192,61 +190,6 @@ under the License.
<check-errors/>
</if-not-empty>
</simple-method>
- <simple-method method-name="updatePortalPagePortletSeq" short-description="Update the portal page sequence numbers">
- <call-simple-method method-name="checkOwnerShip"/>
- <entity-one entity-name="PortalPagePortlet" value-field="portalPagePortlet"/>
- <if-compare field="parameters.mode" value="UP" operator="equals">
- <set field="portalPagePortlet.sequenceNum" value="${portalPagePortlet.sequenceNum - 1}" type="Long"/>
- </if-compare>
- <if-compare field="parameters.mode" value="DOWN" operator="equals">
- <set field="portalPagePortlet.sequenceNum" value="${portalPagePortlet.sequenceNum + 1}" type="Long"/>
- </if-compare>
- <if-compare field="parameters.mode" value="TOP" operator="equals">
- <set field="portalPagePortlet.sequenceNum" value="0" type="Long"/>
- </if-compare>
- <if-compare field="parameters.mode" value="BOTTOM" operator="equals">
- <entity-and entity-name="PortalPagePortlet" list="ppList">
- <field-map field-name="portalPageId" from-field="parameters.portalPageId"/>
- <order-by field-name="-sequenceNum"/>
- </entity-and>
- <first-from-list entry="ppEntry" list="ppList"/>
- <set field="portalPagePortlet.sequenceNum" value="${ppEntry.sequenceNum + 1}" type="Long"/>
- </if-compare>
- <!-- update folowing entries in the same column if any -->
- <if-compare field="parameters.mode" value="BOTTOM" operator="not-equals">
- <if-compare field="parameters.mode" value="DOWN" operator="equals">
- <entity-condition entity-name="PortalPagePortlet" list="ppList">
- <condition-list combine="and">
- <condition-expr field-name="portalPageId" operator="equals" from-field="parameters.portalPageId"/>
- <condition-expr field-name="columnSeqId" operator="equals" from-field="portalPagePortlet.columnSeqId"/>
- <condition-expr field-name="sequenceNum" operator="greater-equals" from-field="portalPagePortlet.sequenceNum"/>
- </condition-list>
- <order-by field-name="+sequenceNum"/>
- </entity-condition>
- <if-not-empty field="ppList">
- <first-from-list entry="ppEntry" list="ppList"/>
- <set field="ppEntry.sequenceNum" value="${portalPagePortlet.sequenceNum - 1}" type="Long"/>
- <store-value value-field="ppEntry"/>
- </if-not-empty>
- <else><!-- this for up and top -->
- <entity-condition entity-name="PortalPagePortlet" list="ppList">
- <condition-list combine="and">
- <condition-expr field-name="portalPageId" operator="equals" from-field="parameters.portalPageId"/>
- <condition-expr field-name="columnSeqId" operator="equals" from-field="portalPagePortlet.columnSeqId"/>
- <condition-expr field-name="sequenceNum" operator="less-equals" from-field="portalPagePortlet.sequenceNum"/>
- </condition-list>
- <order-by field-name="-sequenceNum"/>
- </entity-condition>
- <if-not-empty field="ppList">
- <first-from-list entry="ppEntry" list="ppList"/>
- <set field="ppEntry.sequenceNum" value="${portalPagePortlet.sequenceNum + 1}" type="Long"/>
- <store-value value-field="ppEntry"/>
- </if-not-empty>
- </else>
- </if-compare>
- </if-compare>
- <store-value value-field="portalPagePortlet"/>
- </simple-method>
<simple-method method-name="updatePortalPageSeq" short-description="Update the portal page sequence numbers">
<call-simple-method method-name="checkOwnerShip"/>
<entity-one entity-name="PortalPage" value-field="getSequenceNum"/>
Modified: ofbiz/branches/jquery/framework/common/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/servicedef/services.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/servicedef/services.xml (original)
+++ ofbiz/branches/jquery/framework/common/servicedef/services.xml Wed Oct 20 10:47:53 2010
@@ -624,11 +624,6 @@ under the License.
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
- <service name="updatePortalPagePortletSeq" engine="simple" default-entity-name="PortalPagePortlet" auth="true"
- location="component://common/script/org/ofbiz/common/PortalPageServices.xml" invoke="updatePortalPagePortletSeq">
- <auto-attributes mode="IN" include="pk"/>
- <attribute name="mode" type="String" mode="IN"/><!-- possible values: TOP, BOTTOM, UP, DOWN -->
- </service>
<service name="updatePortalPageSeq" engine="simple" default-entity-name="PortalPage" auth="true"
location="component://common/script/org/ofbiz/common/PortalPageServices.xml" invoke="updatePortalPageSeq">
<auto-attributes mode="IN" include="pk"/>
Modified: ofbiz/branches/jquery/framework/common/src/org/ofbiz/common/email/EmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/src/org/ofbiz/common/email/EmailServices.java?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/src/org/ofbiz/common/email/EmailServices.java (original)
+++ ofbiz/branches/jquery/framework/common/src/org/ofbiz/common/email/EmailServices.java Wed Oct 20 10:47:53 2010
@@ -491,11 +491,10 @@ public class EmailServices {
for (int i = 0; i < xslfoAttachScreenLocationList.size(); i++) {
String xslfoAttachScreenLocation = xslfoAttachScreenLocationList.get(i);
- String attachmentName = attachmentNameList.get(i);
- if (UtilValidate.isEmpty(attachmentName)) {
- attachmentName = "Details" + i + ".pdf";
+ String attachmentName = "Details.pdf";
+ if (UtilValidate.isNotEmpty(attachmentNameList) && attachmentNameList.size() >= i) {
+ attachmentName = attachmentNameList.get(i);
}
-
isMultiPart = true;
// start processing fo pdf attachment
try {
Modified: ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/portal-controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/portal-controller.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/portal-controller.xml (original)
+++ ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/portal-controller.xml Wed Oct 20 10:47:53 2010
@@ -61,6 +61,11 @@ under the License.
<event type="simple" invoke="copyIfRequiredSystemPage" path="component://common/script/org/ofbiz/common/PortalPageMethods.xml"/>
<response name="success" type="view" value="ManagePortalPages"/>
</request-map>
+ <request-map uri="NewPortalPage">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="NewPortalPage"/>
+ <response name="error" type="request" value="main"/>
+ </request-map>
<request-map uri="addPortlet">
<security https="true" auth="true"/>
<response name="success" type="view" value="addPortlet" save-last-view="true"/>
@@ -83,6 +88,12 @@ under the License.
<response name="success" type="view-last" value="main" save-last-view="true"/>
<response name="error" type="request" value="main"/>
</request-map>
+ <request-map uri="updatePortletSeqDragDrop">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="updatePortletSeqDragDrop"/>
+ <response name="success" type="view-last" value="main" save-last-view="true"/>
+ <response name="error" type="request" value="main"/>
+ </request-map>
<request-map uri="deletePortalPagePortlet">
<security https="true" auth="true"/>
<event type="service" invoke="deletePortalPagePortlet"/>
@@ -162,6 +173,7 @@ under the License.
<view-map name="showPortletMainDecorator" type="screen" page="component://common/widget/PortalPageScreens.xml#showPortletMainDecorator"/>
<view-map name="showPortletSimpleDecorator" type="screen" page="component://common/widget/PortalPageScreens.xml#showPortletSimpleDecorator"/>
<view-map name="ManagePortalPages" type="screen" page="component://common/widget/PortalPageScreens.xml#ManagePortalPages"/>
+ <view-map name="NewPortalPage" type="screen" page="component://common/widget/PortalPageScreens.xml#NewPortalPage"/>
<view-map name="addPortlet" type="screen" page="component://common/widget/PortalPageScreens.xml#AddPortlet"/>
<view-map name="editPortalPortletAttributes" type="screen" page="component://common/widget/PortalPageScreens.xml#EditPortalPortletAttributes"/>
<view-map name="editPortalPageColumnWidth" type="screen" page="component://common/widget/PortalPageScreens.xml#EditPortalPageColumnWidth"/>
Modified: ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml Wed Oct 20 10:47:53 2010
@@ -549,24 +549,4 @@ under the License.
</widgets>
</section>
</screen>
-
- <screen name="PortalPageScreen">
- <section>
- <actions>
- <entity-one entity-name="PortalPage" value-field="portalPage" use-cache="true"/>
- <get-related value-field="portalPage" relation-name="PortalPageColumn"
- order-by-list="columnSeqId" list="portalPageColumns" use-cache="true"/>
- <entity-and entity-name="PortalPagePortletView" list="portalPagePortlets" use-cache="true">
- <field-map field-name="portalPageId" from-field="portalPage.portalPageId"/>
- <order-by field-name="columnSeqId"/>
- <order-by field-name="sequenceNum"/>
- </entity-and>
- </actions>
- <widgets>
- <platform-specific>
- <html><html-template location="component://common/webcommon/portal/showPortalPage.ftl"/></html>
- </platform-specific>
- </widgets>
- </section>
- </screen>
</screens>
Propchange: ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 20 10:47:53 2010
@@ -1,3 +1,3 @@
/ofbiz/branches/addbirt/applications/commonext/widget/HelpScreens.xml:831210-885099,885686-886087
/ofbiz/branches/multitenant20100310/framework/common/widget/HelpScreens.xml:921280-927264
-/ofbiz/trunk/framework/common/widget/HelpScreens.xml:951708-1022407
+/ofbiz/trunk/framework/common/widget/HelpScreens.xml:951708-1024561
Modified: ofbiz/branches/jquery/framework/common/widget/PortalPageForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/widget/PortalPageForms.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/widget/PortalPageForms.xml (original)
+++ ofbiz/branches/jquery/framework/common/widget/PortalPageForms.xml Wed Oct 20 10:47:53 2010
@@ -21,7 +21,7 @@ under the License.
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../widget/dtd/widget-form.xsd">
- <form name="ListPortalPages" type="list" list-name="portalPages" paginate-target="ManagePortalPages" separate-columns="true"
+ <form name="ListPortalPages" type="list" list-name="portalPages" separate-columns="true"
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
<field name="portalPageId" title="${uiLabelMap.CommonEdit}">
<hyperlink description="${uiLabelMap.CommonEdit}" target="ManagePortalPages">
@@ -29,40 +29,40 @@ under the License.
<parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/>
</hyperlink>
</field>
- <field name="top" title="${uiLabelMap.CommonEmptyHeader}" use-when="(ownerUserLoginId.equals("_NA_"))||(sequenceNum == ${parameters.sequenceNumMin})"><hyperlink target="" description=""/></field>
- <field name="bot" title="${uiLabelMap.CommonEmptyHeader}" use-when="(ownerUserLoginId.equals("_NA_"))||(sequenceNum >= ${parameters.sequenceNumMax})"><hyperlink target="" description=""/></field>
- <field name="up" title="${uiLabelMap.CommonEmptyHeader}" use-when="(ownerUserLoginId.equals("_NA_"))||(sequenceNum == ${parameters.sequenceNumMin})"><hyperlink target="" description=""/></field>
- <field name="dwn" title="${uiLabelMap.CommonEmptyHeader}" use-when="(ownerUserLoginId.equals("_NA_"))||(sequenceNum >= ${parameters.sequenceNumMax})"><hyperlink target="" description=""/></field>
- <field name="top" title="${uiLabelMap.CommonEmptyHeader}" use-when="(!ownerUserLoginId.equals("_NA_"))&&(sequenceNum > ${parameters.sequenceNumMin})">
+ <field name="top" title="${uiLabelMap.CommonEmptyHeader}" use-when="(ownerUserLoginId.equals("_NA_"))||(itemIndex == 0)"><hyperlink target="" description=""/></field>
+ <field name="bot" title="${uiLabelMap.CommonEmptyHeader}" use-when="(ownerUserLoginId.equals("_NA_"))||(itemIndex == listSize-1)"><hyperlink target="" description=""/></field>
+ <field name="up" title="${uiLabelMap.CommonEmptyHeader}" use-when="(ownerUserLoginId.equals("_NA_"))||(itemIndex == 0)"><hyperlink target="" description=""/></field>
+ <field name="dwn" title="${uiLabelMap.CommonEmptyHeader}" use-when="(ownerUserLoginId.equals("_NA_"))||(itemIndex == listSize-1)"><hyperlink target="" description=""/></field>
+ <field name="top" title="${uiLabelMap.CommonEmptyHeader}" use-when="(!ownerUserLoginId.equals("_NA_"))&&(itemIndex > 0)">
<hyperlink target="updatePortalPageSeq" image-location="/images/arrow-end-up-green.png">
<parameter param-name="mode" value="TOP"/>
<parameter param-name="portalPageId"/>
<parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/>
</hyperlink>
</field>
- <field name="bot" title="${uiLabelMap.CommonEmptyHeader}" use-when="(!ownerUserLoginId.equals("_NA_"))&&(sequenceNum < ${parameters.sequenceNumMax})">
+ <field name="bot" title="${uiLabelMap.CommonEmptyHeader}" use-when="(!ownerUserLoginId.equals("_NA_"))&&(itemIndex < listSize-1)">
<hyperlink target="updatePortalPageSeq" image-location="/images/arrow-end-down-green.png">
<parameter param-name="mode" value="BOT"/>
<parameter param-name="portalPageId"/>
<parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/>
</hyperlink>
</field>
- <field name="up" title="${uiLabelMap.CommonEmptyHeader}" use-when="(!ownerUserLoginId.equals("_NA_"))&&(sequenceNum > ${parameters.sequenceNumMin})">
+ <field name="up" title="${uiLabelMap.CommonEmptyHeader}" use-when="(!ownerUserLoginId.equals("_NA_"))&&(itemIndex > 0)">
<hyperlink target="updatePortalPageSeq" image-location="/images/arrow-single-up-green.png">
<parameter param-name="mode" value="UP"/>
<parameter param-name="portalPageId"/>
<parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/>
</hyperlink>
</field>
- <field name="dwn" title="${uiLabelMap.CommonEmptyHeader}" use-when="(!ownerUserLoginId.equals("_NA_"))&&(sequenceNum < ${parameters.sequenceNumMax})">
+ <field name="dwn" title="${uiLabelMap.CommonEmptyHeader}" use-when="(!ownerUserLoginId.equals("_NA_"))&&(itemIndex < listSize-1)">
<hyperlink target="updatePortalPageSeq" image-location="/images/arrow-single-down-green.png">
<parameter param-name="mode" value="DWN"/>
<parameter param-name="portalPageId"/>
<parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/>
</hyperlink>
</field>
- <field name="portalPageName" use-when="ownerUserLoginId.equals("_NA_")" title="${uiLabelMap.CommonName}" sort-field="true"><display/></field>
- <field name="portalPageName" use-when="!ownerUserLoginId.equals("_NA_")" title="${uiLabelMap.CommonName}" id-name="portalPageName" widget-style="tabletext" sort-field="true">
+ <field name="portalPageName" use-when="ownerUserLoginId.equals("_NA_")" title="${uiLabelMap.CommonName}"><display/></field>
+ <field name="portalPageName" use-when="!ownerUserLoginId.equals("_NA_")" title="${uiLabelMap.CommonName}" id-name="portalPageName" widget-style="tabletext">
<display>
<in-place-editor url="updatePortalPage" cancel-control="button" saving-text="Updating..." text-between-controls=" ">
<simple-editor/>
@@ -70,8 +70,8 @@ under the License.
</in-place-editor>
</display>
</field>
- <field name="description" use-when="ownerUserLoginId.equals("_NA_")" title="${uiLabelMap.CommonDescription}" widget-style="tabletext" sort-field="true"><display/></field>
- <field name="description" use-when="!ownerUserLoginId.equals("_NA_")" title="${uiLabelMap.CommonDescription}" id-name="portalDescription" widget-style="tabletext" sort-field="true">
+ <field name="description" use-when="ownerUserLoginId.equals("_NA_")" title="${uiLabelMap.CommonDescription}" widget-style="tabletext"><display/></field>
+ <field name="description" use-when="!ownerUserLoginId.equals("_NA_")" title="${uiLabelMap.CommonDescription}" id-name="portalDescription" widget-style="tabletext">
<display>
<in-place-editor url="updatePortalPage" cancel-control="button" saving-text="Updating..." text-between-controls=" ">
<simple-editor/>
@@ -97,8 +97,8 @@ under the License.
<form name="NewPortalPage" type="single" target="createPortalPage">
<field name="parentPortalPageId"><hidden value="${parameters.parentPortalPageId}"/></field>
<field name="sequenceNum"><hidden value="${parameters.portalPagesSize+1}"/></field>
- <field name="portalPageName" position="1"><text/></field>
- <field name="description" position="2"><text/></field>
+ <field name="portalPageName"><text/></field>
+ <field name="description"><text/></field>
<field name="createButton"><submit button-type="button"/></field>
</form>
Modified: ofbiz/branches/jquery/framework/common/widget/PortalPageScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/widget/PortalPageScreens.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/widget/PortalPageScreens.xml (original)
+++ ofbiz/branches/jquery/framework/common/widget/PortalPageScreens.xml Wed Oct 20 10:47:53 2010
@@ -44,17 +44,6 @@ under the License.
</widgets>
</section>
</screen>
- <screen name="showPortletUiLabelDecorator">
- <section>
- <widgets>
- <decorator-screen name="uiLabelDecorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="body">
- <include-screen name="showPortlet"/>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
<screen name="showPortletMainDecorator">
<section>
<widgets>
@@ -84,15 +73,12 @@ under the License.
<actions>
<set field="layoutSettings.javaScripts[]" value="/images/myportal.js" global="true"/>
<set field="layoutSettings.styleSheets[+0]" value="/images/myportal.css" global="true"/>
- <entity-one entity-name="PortalPage" value-field="portalPage"/>
- <set field="title" from-field="portalPage.portalPageName" default-value=""/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <!-- label text=" id: ${parameters.portalPortletId} location: ${portlet.screenLocation} screen: ${portlet.screenName}"></label-->
<container id="portalContainerId">
- <include-screen name="PortalPageScreen" location="component://common/widget/CommonScreens.xml"/>
+ <include-portal-page id="${parameters.portalPageId}" conf-mode="${parameters.confMode}" use-private="${parameters.usePrivate}"/>
</container>
</decorator-section>
</decorator-screen>
@@ -107,66 +93,25 @@ under the License.
<set field="layoutSettings.javaScripts[]" value="/images/myportal.js" global="true"/>
<set field="layoutSettings.styleSheets[+0]" value="/images/myportal.css" global="true"/>
<entity-one entity-name="PortalPage" value-field="portalPage"/>
- <script location="component://common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy"/>
+ <set field="portalPages" value="${groovy:org.ofbiz.widget.PortalPageWorker.getPortalPages(parameters.parentPortalPageId,context)}"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <container style="no-clear">
- <screenlet title="${uiLabelMap.CommonPortalPagesForApplication}: ${parameters.parentPortalPageId}">
- <include-form name="ListPortalPages" location="component://common/widget/PortalPageForms.xml"/>
- </screenlet>
- <section>
- <condition>
- <and>
- <not><if-empty field="portalPage"/></not>
- <not><if-empty field="parameters.editAttributes"/></not>
- </and>
- </condition>
- <actions>
- <property-map resource="CommonUiLabels" map-name="uiLabelMap"/>
- <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/>
- <entity-one entity-name="PortalPortlet" value-field="portalPortlet"/>
- </actions>
- <widgets>
- <screenlet title="${uiLabelMap.CommonEditPortletAttributes}: ${portalPortlet.portletName}">
- <include-form name="${portalPortlet.editFormName}" location="${portalPortlet.editFormLocation}"/>
- </screenlet>
- </widgets>
- <fail-widgets>
- <screenlet title="${uiLabelMap.CommonPortalNewPage}">
- <include-form name="NewPortalPage" location="component://common/widget/PortalPageForms.xml"/>
- </screenlet>
- </fail-widgets>
- </section>
- <section>
- <condition>
- <not><if-empty field="portalPage"/></not>
- </condition>
- <actions>
- <set field="portalPages[]" from-field="portalPage"/>
- <entity-condition entity-name="PortalPageColumn" list="portalPageColumnList">
- <condition-expr field-name="portalPageId" from-field="parameters.portalPageId"/>
- <order-by field-name="columnSeqId"/>
- </entity-condition>
- <entity-condition entity-name="PortalPagePortletView" list="portalPagePortletViewList">
- <condition-expr field-name="portalPageId" from-field="parameters.portalPageId"/>
- <order-by field-name="+columnSeqId"/>
- <order-by field-name="+sequenceNum"/>
- </entity-condition>
- </actions>
- <widgets>
- <container id="portalContainerId">
- <screenlet title="${uiLabelMap.CommonPortalEditPage}: ${portalPage.portalPageName} [${portalPage.portalPageId}]">
- <link target="addPortalPageColumn" style="buttontext" text="${uiLabelMap.CommonAddColumn}">
- <parameter param-name="portalPageId" from-field="portalPage.portalPageId"/>
- </link>
- <platform-specific><html><html-template location="component://common/webcommon/portal/editPortalPage.ftl"/></html></platform-specific>
- </screenlet>
- </container>
- </widgets>
- </section>
- </container>
+ <screenlet id="PortalPagesList" title="${uiLabelMap.CommonPortalPagesForApplication}: ${parameters.parentPortalPageId}" collapsible="true">
+ <container style="button-bar"><link target="NewPortalPage" text="${uiLabelMap.CommonNewPortalPage}" style="buttontext create"/></container>
+ <include-form name="ListPortalPages" location="component://common/widget/PortalPageForms.xml"/>
+ </screenlet>
+ <section>
+ <condition>
+ <not><if-empty field="portalPage"/></not>
+ </condition>
+ <widgets>
+ <screenlet title="${uiLabelMap.CommonPortalEditPage}: ${portalPage.portalPageName} [${portalPage.portalPageId}]">
+ <include-portal-page id="${portalPage.portalPageId}" conf-mode="true"/>
+ </screenlet>
+ </widgets>
+ </section>
</decorator-section>
</decorator-screen>
</widgets>
@@ -183,6 +128,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
+ <container style="button-bar"><link target="backLast" text="${uiLabelMap.CommonBack}" style="buttontext"/></container>
<screenlet title="${uiLabelMap.CommonPortalCategoryPage}: ${parameters.parentPortalPageId}">
<include-form name="PortletCategoryAndPortlet" location="component://common/widget/PortalPageForms.xml"/>
</screenlet>
@@ -195,20 +141,13 @@ under the License.
<screen name="GenericPortalPage">
<section>
- <actions>
- <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
- <set field="portalPageId" value="${pageId}"/>
- </actions>
<widgets>
- <include-screen name="PortalPageScreen" location="component://common/widget/CommonScreens.xml"/>
+ <include-portal-page id="${pageId}"/>
</widgets>
</section>
</screen>
<screen name="FindGenericEntity">
<section>
- <actions>
- <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
- </actions>
<widgets>
<screenlet title="${uiLabelMap.${titleLabel}}">
<include-form name="FindGenericEntity" location="component://common/widget/PortalPageForms.xml"/>
@@ -218,9 +157,6 @@ under the License.
</screen>
<screen name="GenericScreenlet">
<section>
- <actions>
- <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
- </actions>
<widgets>
<screenlet title="${uiLabelMap.${titleLabel}}" collapsible="true" id="scrlt_${formName}">
<include-form name="${formName}" location="${formLocation}"/>
@@ -230,9 +166,6 @@ under the License.
</screen>
<screen name="GenericScreenletAjax">
<section>
- <actions>
- <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
- </actions>
<widgets>
<screenlet title="${uiLabelMap.${titleLabel}}">
<container id="${divIdArea}">
@@ -244,9 +177,6 @@ under the License.
</screen>
<screen name="GenericScreenletAjaxWithMenu">
<section>
- <actions>
- <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
- </actions>
<widgets>
<screenlet title="${uiLabelMap.${titleLabel}}" navigation-menu-name="${menuName}">
<include-menu name="${menuName}" location="${menuLocation}"/>
@@ -265,6 +195,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
+ <container style="button-bar"><link target="backLast" text="${uiLabelMap.CommonBack}" style="buttontext"/></container>
<screenlet title="${uiLabelMap.CommonEditPortletAttributes}: ${portalPortlet.portletName}">
<include-form name="${portalPortlet.editFormName}" location="${portalPortlet.editFormLocation}"/>
</screenlet>
@@ -281,6 +212,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
+ <container style="button-bar"><link target="backLast" text="${uiLabelMap.CommonBack}" style="buttontext"/></container>
<screenlet title="Set column width: ${portalPortlet.portletName}">
<include-form name="EditPortalPageColumnWidth" location="component://common/widget/PortalPageForms.xml"/>
</screenlet>
@@ -289,4 +221,22 @@ under the License.
</widgets>
</section>
</screen>
+ <screen name="NewPortalPage">
+ <section>
+ <widgets>
+ <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <container style="button-bar">
+ <link target="ManagePortalPages" text="${uiLabelMap.CommonBack}" style="buttontext">
+ <parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/>
+ </link>
+ </container>
+ <screenlet title="${uiLabelMap.CommonPortalNewPage}">
+ <include-form name="NewPortalPage" location="component://common/widget/PortalPageForms.xml"/>
+ </screenlet>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
</screens>
Modified: ofbiz/branches/jquery/framework/entity/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/entity/build.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/entity/build.xml (original)
+++ ofbiz/branches/jquery/framework/entity/build.xml Wed Oct 20 10:47:53 2010
@@ -56,7 +56,7 @@ under the License.
</target>
<target name="install-PG-JDBC" description="download the JDBC driver for PostgreSQL">
- <get src="http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc4.jar"
- dest="lib/jdbc/postgresql-8.4-701.jdbc4.jar" usetimestamp="true" />
+ <get src="http://jdbc.postgresql.org/download/postgresql-9.0-801.jdbc4.jar"
+ dest="lib/jdbc/postgresql-9.0-801.jdbc4.jar" usetimestamp="true" />
</target>
</project>
Modified: ofbiz/branches/jquery/framework/example/config/ExampleUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/config/ExampleUiLabels.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/config/ExampleUiLabels.xml (original)
+++ ofbiz/branches/jquery/framework/example/config/ExampleUiLabels.xml Wed Oct 20 10:47:53 2010
@@ -520,6 +520,10 @@
<value xml:lang="th">ลัà¸à¸©à¸à¸°à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¹à¸«à¸¡à¹</value>
<value xml:lang="zh">æ°å»ºæ ·ä¾ç¹å¾</value>
</property>
+ <property key="ExampleNoAttributeSet">
+ <value xml:lang="en">No SpecificTitle attribute set for this portlet. You can use the Portlet attribute editing button to set them.</value>
+ <value xml:lang="it">Non si è specificato nessun valore per l'attributo SpecificTitle in questo Portlet. Utilizza la funzione editing dei parametri per impostarlo.</value>
+ </property>
<property key="ExampleOriginalExample">
<value xml:lang="en">Original Example</value>
<value xml:lang="fr">Exemple original</value>
@@ -541,10 +545,6 @@
<value xml:lang="en">Geolocation via address</value>
<value xml:lang="fr">Géolocalisation par l'adresse</value>
</property>
- <property key="ExamplePortalPageWidgetExamples">
- <value xml:lang="en">include-portal-page widget example</value>
- <value xml:lang="it">Esempio widget include-portal-page</value>
- </property>
<property key="ExamplePortletFirst">
<value xml:lang="en">Hi, this is a first example of portlet</value>
<value xml:lang="it">Salve, questo è il primo esempio di portlet</value>
Modified: ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml Wed Oct 20 10:47:53 2010
@@ -190,7 +190,6 @@ under the License.
</request-map>
<request-map uri="FormWidgetExamples"><security https="true" auth="true"/><response name="success" type="view" value="FormWidgetExamples"/></request-map>
- <request-map uri="PortalPageWidgetExamples"><security https="true" auth="true"/><response name="success" type="view" value="PortalPageWidgetExamples"/></request-map>
<request-map uri="LookupExampleFeature"><security https="true" auth="true"/><response name="success" type="view" value="LookupExampleFeature"/></request-map>
<request-map uri="LookupPartyName"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyName"/></request-map>
@@ -251,7 +250,6 @@ under the License.
<view-map name="EditExampleFeatureExampleAppls" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#EditExampleFeatureExampleAppls"/>
<view-map name="FormWidgetExamples" type="screen" page="component://example/widget/example/FormWidgetExampleScreens.xml#FormWidgetExamples"/>
- <view-map name="PortalPageWidgetExamples" type="screen" page="component://example/widget/example/ExampleScreens.xml#PortalPageWidgetExampleScreen"/>
<view-map name="LookupExampleFeature" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#LookupExampleFeature"/>
<view-map name="LookupPartyName" type="screen" page="component://example/widget/example/FormWidgetExampleLookupScreens.xml#LookupPartyName"/>
Modified: ofbiz/branches/jquery/framework/example/widget/example/ExampleMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/ExampleMenus.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/ExampleMenus.xml (original)
+++ ofbiz/branches/jquery/framework/example/widget/example/ExampleMenus.xml Wed Oct 20 10:47:53 2010
@@ -24,7 +24,6 @@ under the License.
<menu-item name="ExampleMenuItem" title="${uiLabelMap.ExampleExample}"><link target="FindExample"/></menu-item>
<menu-item name="ExampleFeature" title="${uiLabelMap.ExampleFeature}"><link target="FindExampleFeature"/></menu-item>
<menu-item name="FormWidgetExamples" title="${uiLabelMap.ExampleFormWidgetExamples}"><link target="FormWidgetExamples"/></menu-item>
- <menu-item name="PortalPageWidgetExamples" title="${uiLabelMap.ExamplePortalPageWidgetExamples}"><link target="PortalPageWidgetExamples"/></menu-item>
<menu-item name="AjaxExample" title="${uiLabelMap.ExampleAjaxExamples}"><link target="authview/findExampleAjax"/></menu-item>
<menu-item name="portalPage" parent-portal-page-value="${parameters.parentPortalPageId}"/>
<menu-item name="Dashboard" title="${uiLabelMap.ExampleDashboard}" align-style="opposed">
Modified: ofbiz/branches/jquery/framework/example/widget/example/ExampleScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/ExampleScreens.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/ExampleScreens.xml (original)
+++ ofbiz/branches/jquery/framework/example/widget/example/ExampleScreens.xml Wed Oct 20 10:47:53 2010
@@ -463,18 +463,4 @@ under the License.
</widgets>
</section>
</screen>
- <screen name="PortalPageWidgetExampleScreen">
- <section>
- <actions>
- <set field="tabButtonItem" value="PortalPageWidgetExamples"/>
- </actions>
- <widgets>
- <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="body">
- <include-portal-page id="EXAMPLE" edit-mode="${parameters.editmode}"/>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
</screens>
Modified: ofbiz/branches/jquery/framework/example/widget/example/PortletScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/PortletScreens.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/PortletScreens.xml (original)
+++ ofbiz/branches/jquery/framework/example/widget/example/PortletScreens.xml Wed Oct 20 10:47:53 2010
@@ -27,8 +27,19 @@ under the License.
<property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
- <label text="${uiLabelMap.ExamplePortletFirst}"/>
- <label text="...${SpecificTitle}"/>
+ <screenlet title="${uiLabelMap.ExamplePortletFirst}">
+ <section>
+ <condition>
+ <not><if-empty field="SpecificTitle"/></not>
+ </condition>
+ <widgets>
+ <label style="h2">${SpecificTitle}</label>
+ </widgets>
+ <fail-widgets>
+ <label style="h2">${uiLabelMap.ExampleNoAttributeSet}</label>
+ </fail-widgets>
+ </section>
+ </screenlet>
</widgets>
</section>
</screen>
@@ -39,7 +50,8 @@ under the License.
<property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
- <label text="${uiLabelMap.ExamplePortletSecond}"/>
+ <screenlet title="${uiLabelMap.ExamplePortletSecond}">
+ </screenlet>
</widgets>
</section>
</screen>
@@ -50,15 +62,17 @@ under the License.
<property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
- <container style="leftclear">
- <label style="h1" text="${uiLabelMap.ExamplePortletThird}"/>
- </container>
- <container style="leftclear">
- <label style="h2" text="${uiLabelMap.ExamplePortletSpecificTitle}: ${SpecificTitle}"/>
- </container>
- <container style="leftclear">
- <label style="h2" text="${uiLabelMap.ExamplePortletSpecificSubTitle}: ${SpecificSubTitle}"/>
- </container>
+ <screenlet title="${uiLabelMap.ExamplePortletThird}">
+ <container style="leftclear">
+ <label style="h1" text="${uiLabelMap.ExamplePortletThird}"/>
+ </container>
+ <container style="leftclear">
+ <label style="h2" text="${uiLabelMap.ExamplePortletSpecificTitle}: ${SpecificTitle}"/>
+ </container>
+ <container style="leftclear">
+ <label style="h2" text="${uiLabelMap.ExamplePortletSpecificSubTitle}: ${SpecificSubTitle}"/>
+ </container>
+ </screenlet>
</widgets>
</section>
</screen>
Modified: ofbiz/branches/jquery/framework/webtools/data/WebtoolsSecurityData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/data/WebtoolsSecurityData.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/data/WebtoolsSecurityData.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/data/WebtoolsSecurityData.xml Wed Oct 20 10:47:53 2010
@@ -58,11 +58,6 @@ under the License.
<SecurityGroupPermission groupId="FLEXADMIN" permissionId="PERIOD_MAINT"/>
<SecurityGroupPermission groupId="BIZADMIN" permissionId="PERIOD_MAINT"/>
- <!-- PortalPage Maintenance security -->
- <SecurityPermission description="All Portal Page Maintenance pages." permissionId="PORTALPAGE_MAINT"/>
- <SecurityGroupPermission groupId="FULLADMIN" permissionId="PORTALPAGE_MAINT"/>
- <SecurityGroupPermission groupId="FLEXADMIN" permissionId="PORTALPAGE_MAINT"/>
-
<!-- Enum & Status Maintenance security -->
<SecurityPermission description="Use the Enum and Status Maintenance pages." permissionId="ENUM_STATUS_MAINT"/>
<SecurityGroupPermission groupId="FULLADMIN" permissionId="ENUM_STATUS_MAINT"/>
Modified: ofbiz/branches/jquery/framework/webtools/webapp/webtools/main.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/webapp/webtools/main.ftl?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/webapp/webtools/main.ftl (original)
+++ ofbiz/branches/jquery/framework/webtools/webapp/webtools/main.ftl Wed Oct 20 10:47:53 2010
@@ -95,7 +95,7 @@ under the License.
<li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsWorkWithDataFiles}</a></li>
</#if>
<li><h3>${uiLabelMap.WebtoolsMiscSetupTools}</h3></li>
- <#if security.hasPermission("PORTALPAGE_MAINT", session)>
+ <#if security.hasPermission("PORTALPAGE_ADMIN", session)>
<li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsAdminPortalPage}</a></li>
<li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsGeoManagement}</a></li>
</#if>
Modified: ofbiz/branches/jquery/framework/webtools/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/widget/CommonScreens.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/widget/CommonScreens.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/widget/CommonScreens.xml Wed Oct 20 10:47:53 2010
@@ -284,19 +284,6 @@ under the License.
</section>
</screen>
- <screen name="uiLabelDecorator">
- <section>
- <actions>
- <property-map resource="TemporalExpressionUiLabels" map-name="uiLabelMap" global="true"/>
- <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
- <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
- </actions>
- <widgets>
- <decorator-section-include name="body"/>
- </widgets>
- </section>
- </screen>
-
<screen name="CommonGeoManagementDecorator">
<section>
<actions>
Modified: ofbiz/branches/jquery/framework/webtools/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/widget/Menus.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/widget/Menus.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/widget/Menus.xml Wed Oct 20 10:47:53 2010
@@ -49,7 +49,7 @@ under the License.
<link target="FindGeo"/>
</menu-item>
<menu-item name="portalAdmin" title="${uiLabelMap.WebtoolsAdminPortalPage}">
- <condition><if-has-permission permission="PORTALPAGE_MAINT"/></condition>
+ <condition><if-has-permission permission="PORTALPAGE_ADMIN"/></condition>
<link target="FindPortalPage"/>
</menu-item>
<menu-item name="tests" title="Tests">
Modified: ofbiz/branches/jquery/framework/webtools/widget/PortalAdmForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/widget/PortalAdmForms.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/widget/PortalAdmForms.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/widget/PortalAdmForms.xml Wed Oct 20 10:47:53 2010
@@ -83,7 +83,10 @@ under the License.
<field name="portalPageId" use-when="!"${portalPage.portalPageId}".equals("")" position="1"><display/></field>
<field name="portalPageId" use-when=""${portalPage.portalPageId}".equals("")" position="1"><text/></field>
<field name="originalPortalPageId" position="2"><text/></field>
- <field name="ownerUserLoginId" ><lookup target-form-name="LookupUserLoginAndPartyDetails"/></field>
+ <field name="ownerUserLoginId">
+ <!-- <lookup target-form-name="LookupUserLoginAndPartyDetails"/> -->
+ <text/>
+ </field>
<field name="parentPortalPageId" position="2"><text/></field>
<field name="portalPageName"><text/></field>
<field name="description" position="2"><text size="60"/></field>
Modified: ofbiz/branches/jquery/framework/webtools/widget/PortalAdmScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/widget/PortalAdmScreens.xml?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/widget/PortalAdmScreens.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/widget/PortalAdmScreens.xml Wed Oct 20 10:47:53 2010
@@ -57,24 +57,24 @@ under the License.
</screen>
<screen name="CreatePortalPage">
- <section>
+ <section>
<actions>
<set field="targetPortalPage" value="createPortalPageAdm"/>
</actions>
- <widgets>
- <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="body">
- <section>
- <actions>
- <set field="portalPage.portalPageId" value=""/>
- <set field="editPortalPageId" value="Y"/>
- </actions>
- <widgets><include-form name="EditPortalPage" location="component://webtools/widget/PortalAdmForms.xml"/></widgets>
- </section>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
+ <widgets>
+ <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <section>
+ <actions>
+ <set field="portalPage.portalPageId" value=""/>
+ <set field="editPortalPageId" value="Y"/>
+ </actions>
+ <widgets><include-form name="EditPortalPage" location="component://webtools/widget/PortalAdmForms.xml"/></widgets>
+ </section>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
</screen>
<screen name="EditPortalPage">
@@ -88,65 +88,25 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <container style="no-clear">
- <section>
- <condition>
- <not><if-empty field="portalPage"/></not>
- </condition>
- <actions><set field="targetPortalPage" value="updatePortalPageAdm"/></actions>
- <widgets>
- <screenlet title="${uiLabelMap.CommonPortalEditPage}" navigation-menu-name="PortalPageAdmin">
- <include-menu name="PortalPageAdmin" location="component://webtools/widget/Menus.xml"/>
- <include-form name="EditPortalPage" location="component://webtools/widget/PortalAdmForms.xml"/>
- </screenlet>
- </widgets>
- </section>
- <section>
- <condition>
- <and>
- <not><if-empty field="portalPage"/></not>
- <not><if-empty field="parameters.editAttributes"/></not>
- </and>
- </condition>
- <actions>
- <property-map resource="CommonUiLabels" map-name="uiLabelMap"/>
- <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/>
- <entity-one entity-name="PortalPortlet" value-field="portalPortlet"/>
- </actions>
- <widgets>
- <screenlet title="${uiLabelMap.CommonEditPortletAttributes}: ${portalPortlet.portletName}">
- <include-form name="${portalPortlet.editFormName}" location="${portalPortlet.editFormLocation}"/>
- </screenlet>
- </widgets>
- </section>
- <section>
- <condition>
- <not><if-empty field="portalPage"/></not>
- </condition>
- <actions>
- <set field="portalPages[]" from-field="portalPage"/>
- <entity-condition entity-name="PortalPageColumn" list="portalPageColumnList">
- <condition-expr field-name="portalPageId" from-field="parameters.portalPageId"/>
- <order-by field-name="columnSeqId"/>
- </entity-condition>
- <entity-condition entity-name="PortalPagePortletView" list="portalPagePortletViewList">
- <condition-expr field-name="portalPageId" from-field="parameters.portalPageId"/>
- <order-by field-name="+columnSeqId"/>
- <order-by field-name="+sequenceNum"/>
- </entity-condition>
- </actions>
- <widgets>
- <container id="portalContainerId">
- <screenlet title="${uiLabelMap.CommonPortalEditPage}: ${portalPage.portalPageName} [${portalPage.portalPageId}]">
- <link target="addPortalPageColumn" style="buttontext" text="${uiLabelMap.CommonAddColumn}">
- <parameter param-name="portalPageId" from-field="portalPage.portalPageId"/>
- </link>
- <platform-specific><html><html-template location="component://common/webcommon/portal/editPortalPage.ftl"/></html></platform-specific>
- </screenlet>
- </container>
- </widgets>
- </section>
- </container>
+ <section>
+ <condition>
+ <not><if-empty field="portalPage"/></not>
+ </condition>
+ <actions><set field="targetPortalPage" value="updatePortalPageAdm"/></actions>
+ <widgets>
+ <screenlet title="${uiLabelMap.CommonPortalEditPage}" navigation-menu-name="PortalPageAdmin">
+ <include-menu name="PortalPageAdmin" location="component://webtools/widget/Menus.xml"/>
+ <include-form name="EditPortalPage" location="component://webtools/widget/PortalAdmForms.xml"/>
+ </screenlet>
+ </widgets>
+ </section>
+ <section>
+ <widgets>
+ <screenlet title="${uiLabelMap.CommonPortalEditPage}: ${portalPage.portalPageName} [${portalPage.portalPageId}]">
+ <include-portal-page id="${portalPage.portalPageId}" conf-mode="true" use-private="false" />
+ </screenlet>
+ </widgets>
+ </section>
</decorator-section>
</decorator-screen>
</widgets>
Modified: ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd (original)
+++ ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd Wed Oct 20 10:47:53 2010
@@ -1095,8 +1095,17 @@ under the License.
</xs:element>
<xs:attributeGroup name="attlist.include-portal-page">
<xs:attribute type="xs:string" name="id"/>
- <xs:attribute name="edit-mode" default="false">
- <xs:annotation><xs:documentation>Show the portal in edit mode.</xs:documentation></xs:annotation>
+ <xs:attribute name="conf-mode" default="false">
+ <xs:annotation><xs:documentation>Show the portal in configuration mode.</xs:documentation></xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="use-private" default="true">
+ <xs:annotation><xs:documentation>If a derived private PortalPage exists for the actual UserLogin than show the private PortalPage instead of the original.</xs:documentation></xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/PortalPageWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/PortalPageWorker.java?rev=1025485&r1=1025484&r2=1025485&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/PortalPageWorker.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/PortalPageWorker.java Wed Oct 20 10:47:53 2010
@@ -19,14 +19,26 @@
package org.ofbiz.widget;
import java.io.IOException;
+import java.util.List;
import java.util.Map;
+import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.ServiceUtil;
+import org.ofbiz.security.authz.Authorization;
/**
* PortalPageWorker Class
*/
-public class PortalPageWorker implements org.ofbiz.widget.PortalPageWorkerInterface {
+public class PortalPageWorker {
public static final String module = PortalPageWorker.class.getName();
@@ -37,4 +49,129 @@ public class PortalPageWorker implements
return "success";
}
+ /**
+ * Returns a list of PortalPages that have the specified parentPortalPageId as parent.
+ * If a specific PortalPage exists for the current userLogin it is returned instead of the original one.
+ */
+ public static List<GenericValue> getPortalPages(String parentPortalPageId, Map<String, Object> context) {
+ List<GenericValue> portalPages = null;
+ if (UtilValidate.isNotEmpty(parentPortalPageId)) {
+ Delegator delegator = WidgetWorker.getDelegator(context);
+ try {
+ // first get public pages
+ EntityCondition cond =
+ EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, "_NA_"),
+ EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("portalPageId", EntityOperator.EQUALS, parentPortalPageId),
+ EntityCondition.makeCondition("parentPortalPageId", EntityOperator.EQUALS, parentPortalPageId)),
+ EntityOperator.OR)),
+ EntityOperator.AND);
+ portalPages = delegator.findList("PortalPage", cond, null, null, null, false);
+ if (UtilValidate.isNotEmpty(context.get("userLogin"))) { // check if a user is logged in
+ String userLoginId = ((GenericValue)context.get("userLogin")).getString("userLoginId");
+ // replace with private pages
+ for (GenericValue portalPage : portalPages) {
+ cond = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, userLoginId),
+ EntityCondition.makeCondition("originalPortalPageId", EntityOperator.EQUALS, portalPage.getString("portalPageId"))),
+ EntityOperator.AND);
+ List <GenericValue> privatePortalPages = delegator.findList("PortalPage", cond, null, null, null, false);
+ if (UtilValidate.isNotEmpty(privatePortalPages)) {
+ portalPages.remove(portalPage);
+ portalPages.add(privatePortalPages.get(0));
+ }
+ }
+ // add any other created private pages
+ cond = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, userLoginId),
+ EntityCondition.makeCondition("originalPortalPageId", EntityOperator.EQUALS, null),
+ EntityCondition.makeCondition("parentPortalPageId", EntityOperator.EQUALS, parentPortalPageId)),
+ EntityOperator.AND);
+ portalPages.addAll(delegator.findList("PortalPage", cond, null, null, null, false));
+ }
+ portalPages = EntityUtil.orderBy(portalPages, UtilMisc.toList("sequenceNum"));
+ } catch (GenericEntityException e) {
+ Debug.logError("Could not retrieve portalpages:" + e.getMessage(), module);
+ }
+ }
+ return portalPages;
+ }
+
+ /**
+ * Returns the PortalPage with the specified portalPageId.
+ * If a specific PortalPage exists for the current userLogin it is returned instead of the original one.
+ */
+ public static GenericValue getPortalPage(String portalPageId, Map<String, Object> context) {
+ GenericValue portalPage = null;
+ if (UtilValidate.isNotEmpty(portalPageId)) {
+ Delegator delegator = WidgetWorker.getDelegator(context);
+ try {
+ // Get the current userLoginId
+ String userLoginId = "_NA_";
+ if (UtilValidate.isNotEmpty(context.get("userLogin"))) { // check if a user is logged in
+ userLoginId = ((GenericValue)context.get("userLogin")).getString("userLoginId");
+ }
+
+ // Get the PortalPage ensuring that it is either owned by the user or a system page
+ EntityCondition cond = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("portalPageId", EntityOperator.EQUALS, portalPageId),
+ EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, "_NA_"),
+ EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, userLoginId)),
+ EntityOperator.OR)),
+ EntityOperator.AND);
+ List <GenericValue> portalPages = delegator.findList("PortalPage", cond, null, null, null, false);
+ if (UtilValidate.isNotEmpty(portalPages)) {
+ portalPage = EntityUtil.getFirst(portalPages);
+ }
+
+ // If a derived PortalPage private to the user exists, returns this instead of the system one
+ cond = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("originalPortalPageId", EntityOperator.EQUALS, portalPageId),
+ EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, userLoginId)),
+ EntityOperator.AND);
+ List <GenericValue> privateDerivedPortalPages = delegator.findList("PortalPage", cond, null, null, null, false);
+ if (UtilValidate.isNotEmpty(privateDerivedPortalPages)) {
+ portalPage = EntityUtil.getFirst(privateDerivedPortalPages);
+ }
+ } catch (GenericEntityException e) {
+ Debug.logError("Could not retrieve portalpage:" + e.getMessage(), module);
+ }
+ }
+ return portalPage;
+ }
+
+ /**
+ * Checks if the user is allowed to configure the PortalPage.
+ * PortalPage configuration is allowed if he is the PortalPage owner or he has got the PORTALPAGE_ADMIN permission
+ */
+ public static Boolean userIsAllowedToConfigure(String portalPageId, Map<String, Object> context) {
+ Boolean userIsAllowed = false;
+
+ if (UtilValidate.isNotEmpty(portalPageId)) {
+ GenericValue userLogin = (GenericValue) context.get("userLogin");
+ if (UtilValidate.isNotEmpty(userLogin)) {
+ String userLoginId = (String) userLogin.get("userLoginId");
+ Authorization authz = (Authorization) context.get("authz");
+
+ Boolean hasPortalAdminPermission = authz.hasPermission(userLoginId, "PORTALPAGE_ADMIN", context);
+ try {
+ Delegator delegator = WidgetWorker.getDelegator(context);
+ GenericValue portalPage = delegator.findOne("PortalPage", UtilMisc.toMap("portalPageId", portalPageId),false);
+
+ if (UtilValidate.isNotEmpty(portalPage)) {
+ String ownerUserLoginId = (String) portalPage.get("ownerUserLoginId");
+ // Users with PORTALPAGE_ADMIN permission can configure every Portal Page
+ userIsAllowed = (ownerUserLoginId.equals(userLoginId) || hasPortalAdminPermission);
+ }
+ } catch (GenericEntityException e) {
+ return false;
+ }
+ }
+ }
+
+ return userIsAllowed;
+ }
+
}