diff --git a/framework/common/config/CommonUiLabels.xml b/framework/common/config/CommonUiLabels.xml index 2df37c81f1..654d3835b6 100644 --- a/framework/common/config/CommonUiLabels.xml +++ b/framework/common/config/CommonUiLabels.xml @@ -150,6 +150,10 @@ 添加一个 新建 + + Add A Portlet... + Aggiungi un portlet... + إضافة القيم الإفتراضية Přidat standard @@ -1195,6 +1199,10 @@ 配置 配置 + + Configure: + Configura: + تأكيد Bestätigen @@ -3530,6 +3538,34 @@ 更多 更多 + + Move Portlet at the Bottom + Sposta il portlet in fondo + + + Move Portlet Down + Sposta il portlet in basso + + + Move Portlet Left + Sposta il portlet a sinistra + + + Move Portlet Right + Sposta il portlet a destra + + + Move Portlet at the Top + Sposta il portlet in cima + + + Move Portlet Up + Sposta il portlet in alto + + + Move to Portal Page... + Sposta nella pagina... + حالتي Mein Status @@ -4849,6 +4885,10 @@ 删除过期的 删除过期的 + + Remove Portlet + Rimuovi il portlet + تقارير Berichte @@ -5196,6 +5236,14 @@ 选择一个 选择一个 + + Select Portal Page... + Seleziona pagina... + + + Manage Portal Pages... + Gestione pagine... + مختارة ausgewählt diff --git a/framework/common/data/PortalDemoData.xml b/framework/common/data/PortalDemoData.xml new file mode 100644 index 0000000000..8f1c54453d --- /dev/null +++ b/framework/common/data/PortalDemoData.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + diff --git a/framework/common/entitydef/entitymodel.xml b/framework/common/entitydef/entitymodel.xml index 14d6ddc40a..997fd32382 100644 --- a/framework/common/entitydef/entitymodel.xml +++ b/framework/common/entitydef/entitymodel.xml @@ -550,4 +550,82 @@ under the License. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Identify the portalPortlet instance in case more copy of the same portalPortlet are present in the same portalPage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/common/ofbiz-component.xml b/framework/common/ofbiz-component.xml index ffdc646783..9435c828ef 100644 --- a/framework/common/ofbiz-component.xml +++ b/framework/common/ofbiz-component.xml @@ -52,6 +52,9 @@ under the License. + + + diff --git a/framework/common/script/org/ofbiz/common/PortalPageMethods.xml b/framework/common/script/org/ofbiz/common/PortalPageMethods.xml new file mode 100644 index 0000000000..2b3ac25b90 --- /dev/null +++ b/framework/common/script/org/ofbiz/common/PortalPageMethods.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/common/script/org/ofbiz/common/PortalPageServices.xml b/framework/common/script/org/ofbiz/common/PortalPageServices.xml new file mode 100644 index 0000000000..f048fb7910 --- /dev/null +++ b/framework/common/script/org/ofbiz/common/PortalPageServices.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/common/servicedef/services.xml b/framework/common/servicedef/services.xml index db0fefebd9..1e024fdaa0 100644 --- a/framework/common/servicedef/services.xml +++ b/framework/common/servicedef/services.xml @@ -557,25 +557,75 @@ under the License. - Update a Temporal Expression - Create a Temporal Expression Association - Delete a Temporal Expression Association + + + Add a registered PortalPortlet to a PortalPage + + + + + + Update a PortalPortlet + + + + + Delete a PortalPortlet from a PortalPage + + + + + Move a PortalPortlet from the actual portalPage to a different one + + + + + + + + + Create a new Portal Page + + + + + Update a Portal Page + + + + + + + Create a new Portlet Attribute + + + + + Get all attributes of a Portlet + + + + + diff --git a/framework/common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy b/framework/common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy new file mode 100644 index 0000000000..62cd8e642d --- /dev/null +++ b/framework/common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.ofbiz.entity.*; +import org.ofbiz.entity.condition.*; + +portalPageId = request.getAttribute("portalPageId"); +portalPortletId = request.getAttribute("portalPortletId"); +portletSeqId = request.getAttribute("portletSeqId"); + +portletAttributes = delegator.findList("PortletAttribute", + EntityCondition.makeCondition([portalPageId : portalPageId, portalPortletId: portalPortletId, portletSeqId: portletSeqId]), + null, null, null, false); + +iter = portletAttributes.iterator(); + +while (iter) { + attribute = iter.next(); + + context.put(attribute.attrName, attribute.attrValue); +} diff --git a/framework/common/webcommon/WEB-INF/common-controller.xml b/framework/common/webcommon/WEB-INF/common-controller.xml index 03f8db0318..a145e99f6a 100644 --- a/framework/common/webcommon/WEB-INF/common-controller.xml +++ b/framework/common/webcommon/WEB-INF/common-controller.xml @@ -20,7 +20,7 @@ under the License. - Common Requests Configuration File + Common ControlServlet Configuration File Copyright 2001-2008 The Apache Software Foundation /error/error.jsp diff --git a/framework/common/webcommon/WEB-INF/portal-controller.xml b/framework/common/webcommon/WEB-INF/portal-controller.xml new file mode 100644 index 0000000000..57786717e9 --- /dev/null +++ b/framework/common/webcommon/WEB-INF/portal-controller.xml @@ -0,0 +1,92 @@ + + + + + Portal ControlServlet Configuration File + Copyright 2001-2008 The Apache Software Foundation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/common/webcommon/portal/listPortalPortlets.ftl b/framework/common/webcommon/portal/listPortalPortlets.ftl new file mode 100644 index 0000000000..54ac0409a2 --- /dev/null +++ b/framework/common/webcommon/portal/listPortalPortlets.ftl @@ -0,0 +1,72 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + + +
+
+ +
+
+ <#if portalPortlets?has_content> + <#assign orderByList = Static["org.ofbiz.base.util.UtilMisc"].toList("portalPortletId")/> + + + <#assign leftColumn = true/> + <#list portalPortlets as portalPortlet> + <#if leftColumn==true> + + + + <#if leftColumn==false> + + + <#assign leftColumn = !leftColumn/> + +
+ + + + + +
+ +
+ ${portalPortlet.description} +
+
+ <#if portalPortlet.screenshot?has_content> +
+ +
+ +
+
+ + +
diff --git a/framework/common/webcommon/portal/portalPage.ftl b/framework/common/webcommon/portal/portalPage.ftl new file mode 100644 index 0000000000..e582ee5d19 --- /dev/null +++ b/framework/common/webcommon/portal/portalPage.ftl @@ -0,0 +1,150 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#if currentPortalPage?has_content> + +
+
    + <#if currentPortalPage.portalName?has_content> +
  • + ${currentPortalPage.portalName} +
  • + + + <#if (portalPages.size() > 1)> +
  • + +
  • + + +
  • + ${uiLabelMap.CommonManagePortalPages} +
  • + +
  • + ${uiLabelMap.CommonConfigure} + <#if configurePortalPage?has_content> + ON | OFF + <#else> + ON | OFF + +
  • + + <#if configurePortalPage?has_content> +
  • + ${uiLabelMap.CommonAddAPortlet} +
  • + + +
+
+
+ + + + <#list portalPageColumnList?if_exists as portalPageColumn> + + + + +
width="${portalPageColumn.columnWidthPixels}"> + <#assign firstInColumn = true/> + <#list portalPagePortletViewList as portlet> + <#if (!portlet.columnSeqId?has_content && portalPageColumn_index == 0) || (portlet.columnSeqId?if_exists == portalPageColumn.columnSeqId)> + <#if portlet.screenName?has_content> + <#if configurePortalPage?has_content> + <#assign portletUrlLink = "portalPageId="+currentPortalPage.portalPageId+"&portalPortletId="+portlet.portalPortletId+"&portletSeqId="+portlet.portletSeqId+"&configurePortalPage=true" /> + +
+
+
    +
  • Portlet : ${portlet.portletName}
  • +
  •    
  • + + <#if (portlet.editFormName?has_content && portlet.editFormLocation?has_content)> +
  •    
  • + + + <#if portlet_has_next> <#-- TODO: this doesn't take into account that later items in the list might be in a different column --> +
  •    
  • + + <#if !firstInColumn> +
  •    
  • + + <#if portalPageColumn_has_next> +
  •    
  • + + <#if (portalPageColumn_index > 0)> +
  •    
  • + + <#if !firstInColumn> +
  •    
  • + + <#if portlet_has_next> <#-- TODO: this doesn't take into account that later items in the list might be in a different column --> +
  •    
  • + + <#if (portalPages.size() > 1)> +
  • + +
  • + +
+
+
+
+ + + <#assign screenFileName = portlet.screenLocation + "#" + portlet.screenName/> +
+ ${setRequestAttribute("portalPageId", currentPortalPage.portalPageId)} + ${setRequestAttribute("portalPortletId", portlet.portalPortletId)} + ${setRequestAttribute("portletSeqId", portlet.portletSeqId)} + + ${screens.render(screenFileName)} +
+ + <#if configurePortalPage?has_content> +
+
+ + + <#assign firstInColumn = false/> + + + <#if portalPageColumn_has_next> +
 
+ +<#else/> +

No portal page data found. You may not have the necessary seed or other data for it.

+ diff --git a/framework/common/widget/PortalPageForms.xml b/framework/common/widget/PortalPageForms.xml new file mode 100644 index 0000000000..1d2d9c1fea --- /dev/null +++ b/framework/common/widget/PortalPageForms.xml @@ -0,0 +1,76 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + +
diff --git a/framework/common/widget/PortalPageScreens.xml b/framework/common/widget/PortalPageScreens.xml new file mode 100644 index 0000000000..b772db9106 --- /dev/null +++ b/framework/common/widget/PortalPageScreens.xml @@ -0,0 +1,100 @@ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + + + + + +
+
+ + +
+ + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + +
+
+
diff --git a/framework/common/widget/PortletEditForms.xml b/framework/common/widget/PortletEditForms.xml new file mode 100644 index 0000000000..a09ea0a316 --- /dev/null +++ b/framework/common/widget/PortletEditForms.xml @@ -0,0 +1,56 @@ + + + + + +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ +
diff --git a/framework/common/widget/PortletScreens.xml b/framework/common/widget/PortletScreens.xml new file mode 100644 index 0000000000..a2bcdc38e6 --- /dev/null +++ b/framework/common/widget/PortletScreens.xml @@ -0,0 +1,42 @@ + + + + + + +
+ + +
+
+ + +
+ + + + + +
+
+ +
diff --git a/framework/example/data/ExampleDemoData.xml b/framework/example/data/ExampleDemoData.xml new file mode 100644 index 0000000000..677dbc20ae --- /dev/null +++ b/framework/example/data/ExampleDemoData.xml @@ -0,0 +1,33 @@ + + + + + + + + + diff --git a/framework/example/ofbiz-component.xml b/framework/example/ofbiz-component.xml index c6b89b13fb..b86e8a2c0d 100644 --- a/framework/example/ofbiz-component.xml +++ b/framework/example/ofbiz-component.xml @@ -36,7 +36,8 @@ under the License. - + + - + + Example Component Site Configuration File Copyright 2001-2008 The Apache Software Foundation diff --git a/framework/example/widget/example/ExampleMenus.xml b/framework/example/widget/example/ExampleMenus.xml index 1c2771f1f6..a0c80be727 100644 --- a/framework/example/widget/example/ExampleMenus.xml +++ b/framework/example/widget/example/ExampleMenus.xml @@ -26,6 +26,8 @@ under the License. + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ + + + + + +
+ +
diff --git a/framework/example/widget/example/PortletScreens.xml b/framework/example/widget/example/PortletScreens.xml new file mode 100644 index 0000000000..0988d41cf0 --- /dev/null +++ b/framework/example/widget/example/PortletScreens.xml @@ -0,0 +1,52 @@ + + + + + + +
+ + +