Author: hansbak
Date: Mon Dec 8 22:17:35 2008 New Revision: 724618 URL: http://svn.apache.org/viewvc?rev=724618&view=rev Log: update of portal pages with including column support and now using the 'normal' ofbiz interface Added: ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl (with props) ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl (with props) Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml ofbiz/trunk/framework/common/servicedef/services.xml ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl ofbiz/trunk/framework/common/widget/PortalPageForms.xml ofbiz/trunk/framework/common/widget/PortalPageScreens.xml ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml ofbiz/trunk/framework/example/widget/example/CommonScreens.xml ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml ofbiz/trunk/framework/images/webapp/images/maincss.css Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Mon Dec 8 22:17:35 2008 @@ -159,6 +159,10 @@ <value xml:lang="zh_CN">æ·»å ä¸ä¸ª</value> <value xml:lang="zh">æ°å»º</value> </property> + <property key="CommonAddColumn"> + <value xml:lang="en">Add Column</value> + <value xml:lang="it">Aggiungi una colonna</value> + </property> <property key="CommonAddAPortlet"> <value xml:lang="en">Add A Portlet...</value> <value xml:lang="it">Aggiungi un portlet...</value> @@ -3814,7 +3818,7 @@ <value xml:lang="ro">Nici-o informatie contact in Fisier</value> <value xml:lang="ru">ÐонÑакÑной инÑоÑмаÑии по ÑÐ°Ð¹Ð»Ñ Ð½Ðµ найдено</value> <value xml:lang="th">à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥à¸à¸²à¸£à¸à¸´à¸à¸à¹à¸à¸à¸à¹à¸à¸¥à¹</value> - <value xml:lang="zh_CN">æ件é没æè系信æ¯</value> + <value xml:lang="zh_CN">æÂ件é没æè系信æ¯</value> <value xml:lang="zh">æ è系信æ¯</value> </property> <property key="CommonNoContains"> Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml (original) +++ ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml Mon Dec 8 22:17:35 2008 @@ -38,6 +38,33 @@ <check-errors/> </simple-method> + <simple-method method-name="addPortalPageColumn" short-description="Add a new Column to a PortalPage"> + <make-value entity-name="PortalPageColumn" value-name="newEntity"/> + <set-pk-fields map-name="parameters" value-name="newEntity"/> + <make-next-seq-id value-name="newEntity" seq-field-name="columnSeqId"/> + <field-to-result field-name="newEntity.columnSeqId" result-name="columnSeqId"/> + <set-nonpk-fields map-name="parameters" value-name="newEntity"/> + <create-value value-name="newEntity"/> + </simple-method> + + <simple-method method-name="deletePortalPageColumn" short-description="Delete a Column from a PortalPage"> + <entity-one entity-name="PortalPageColumn" value-name="column" auto-field-map="true" use-cache="true"/> + + <if-not-empty field="column"> + <entity-and entity-name="PortalPagePortlet" list-name="portalPortletList"> + <field-map field-name="portalPageId" env-name="column.portalPageId"/> + <field-map field-name="columnSeqId" env-name="column.columnSeqId"/> + </entity-and> + + <iterate list-name="portalPortletList" entry-name="portalPortlet"> + <set-service-fields service-name="deletePortalPagePortlet" to-map-name="deletePortalPagePortletInMap" map-name="portalPortlet"/> + <call-service service-name="deletePortalPagePortlet" in-map-name="deletePortalPagePortletInMap"/> + </iterate> + + <remove-value value-name="column"/> + </if-not-empty> + </simple-method> + <simple-method method-name="createPortalPagePortlet" short-description="Add a registered PortalPortlet to a PortalPage"> <make-value entity-name="PortalPagePortlet" value-name="newEntity"/> <set-pk-fields map-name="parameters" value-name="newEntity"/> @@ -45,6 +72,24 @@ <field-to-result field-name="newEntity.portletSeqId" result-name="portletSeqId"/> <set-nonpk-fields map-name="parameters" value-name="newEntity"/> <create-value value-name="newEntity"/> + <make-value entity-name="PortalPageColumn" value-name="newEntity1"/> + <set-pk-fields map-name="parameters" value-name="newEntity1"/> + <make-next-seq-id value-name="newEntity1" seq-field-name="columnSeqId"/> + <create-value value-name="newEntity1"/> + </simple-method> + + <simple-method method-name="deletePortalPagePortlet" short-description="Delete a PortalPortlet from a PortalPageColumn"> + <entity-one entity-name="PortalPagePortlet" value-name="portlet" auto-field-map="true" use-cache="true"/> + + <if-not-empty field="portlet"> + <make-value value-name="newEntity" entity-name="PortletAttribute"/> + <set field="newEntity.portalPageId" from-field="portlet.portalPageId"/> + <set field="newEntity.portalPortletId" from-field="portlet.portalPortletId"/> + <set field="newEntity.portletSeqId" from-field="portlet.portletSeqId"/> + <remove-by-and entity-name="PortletAttribute" map-name="newEntity"/> + + <remove-value value-name="portlet"/> + </if-not-empty> </simple-method> <simple-method method-name="getPortletAttributes" short-description="Get all attributes of a Portlet" login-required="true"> @@ -59,4 +104,37 @@ <field-to-result field-name="attributeMap" result-name="attributeMap"/> </simple-method> + <simple-method method-name="createPortalPage" short-description="Create a new Portal Page"> + <make-value entity-name="PortalPage" value-name="newPortalPage"/> + <set-pk-fields map-name="parameters" value-name="newPortalPage"/> + <make-next-seq-id value-name="newPortalPage" seq-field-name="portalPageId"/> + + <set-nonpk-fields map-name="parameters" value-name="newPortalPage"/> + <create-value value-name="newPortalPage"/> + + <make-value entity-name="PortalPageColumn" value-name="newPortalPageColumn"/> + <set field="newPortalPageColumn.portalPageId" from-field="newPortalPage.portalPageId"/> + <set field="newPortalPageColumn.columnSeqId" value="1"/> + <create-value value-name="newPortalPageColumn"/> + + <field-to-result field-name="newPortalPage.portalPageId" result-name="portalPageId"/> + </simple-method> + + <simple-method method-name="deletePortalPage" short-description="Delete a Portal Page"> + <entity-one entity-name="PortalPage" value-name="portalPage" auto-field-map="true" use-cache="true"/> + + <if-not-empty field="portalPage"> + <entity-and entity-name="PortalPageColumn" list-name="portalPageColumnList"> + <field-map field-name="portalPageId" env-name="portalPage.portalPageId"/> + </entity-and> + + <iterate list-name="portalPageColumnList" entry-name="portalPageColumn"> + <set-service-fields service-name="deletePortalPageColumn" to-map-name="deletePortalPageColumnInMap" map-name="portalPageColumn"/> + <call-service service-name="deletePortalPageColumn" in-map-name="deletePortalPageColumnInMap"/> + </iterate> + + <remove-value value-name="portalPage"/> + </if-not-empty> + + </simple-method> </simple-methods> Modified: ofbiz/trunk/framework/common/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/common/servicedef/services.xml (original) +++ ofbiz/trunk/framework/common/servicedef/services.xml Mon Dec 8 22:17:35 2008 @@ -588,7 +588,8 @@ <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="deletePortalPagePortlet" default-entity-name="PortalPagePortlet" engine="entity-auto" invoke="delete" auth="true"> + <service name="deletePortalPagePortlet" default-entity-name="PortalPagePortlet" engine="simple" auth="true" + location="org/ofbiz/common/PortalPageServices.xml" invoke="deletePortalPagePortlet"> <description>Delete a PortalPortlet from a PortalPage</description> <auto-attributes include="pk" mode="IN" optional="false"/> </service> @@ -603,7 +604,8 @@ </service> <!-- Portal Page services --> - <service name="createPortalPage" default-entity-name="PortalPage" engine="entity-auto" invoke="create" auth="true"> + <service name="createPortalPage" default-entity-name="PortalPage" engine="simple" auth="true" + location="org/ofbiz/common/PortalPageServices.xml" invoke="createPortalPage"> <description>Create a new Portal Page</description> <auto-attributes include="pk" mode="OUT" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> @@ -613,6 +615,26 @@ <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> + <service name="deletePortalPage" default-entity-name="PortalPage" engine="simple" auth="true" + location="org/ofbiz/common/PortalPageServices.xml" invoke="deletePortalPage"> + <description>Delete a Portal Page</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + + <!-- PortalPageColumn services --> + <service name="addPortalPageColumn" default-entity-name="PortalPageColumn" engine="simple" auth="true" + location="org/ofbiz/common/PortalPageServices.xml" invoke="addPortalPageColumn"> + <description>Add a new Column to a PortalPage</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="columnSeqId" mode="OUT" optional="true"/> + </service> + <service name="deletePortalPageColumn" default-entity-name="PortalPageColumn" engine="simple" auth="true" + location="org/ofbiz/common/PortalPageServices.xml" invoke="deletePortalPageColumn"> + <description>Delete a Column from a PortalPage</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + </service> <!-- PortletAttribute services --> <service name="createPortletAttribute" default-entity-name="PortletAttribute" engine="entity-auto" invoke="create" auth="true"> Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml (original) +++ ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml Mon Dec 8 22:17:35 2008 @@ -77,12 +77,30 @@ <response name="success" type="request" value="ManagePortalPages"/> <response name="error" type="request" value="ManagePortalPages"/> </request-map> + <request-map uri="deletePortalPage"> + <security https="true" auth="true"/> + <event type="service" invoke="deletePortalPage"/> + <response name="success" type="request" value="ManagePortalPages"/> + <response name="error" type="request" value="ManagePortalPages"/> + </request-map> <request-map uri="setPortalPortletAttributes"> <security https="true" auth="true"/> <event type="simple" invoke="setPortalPortletAttributes" path="org/ofbiz/common/PortalPageMethods.xml"/> <response name="success" type="request" value="EditPortlet"/> <response name="error" type="request" value="EditPortlet"/> </request-map> + <request-map uri="addPortalPageColumn"> + <security https="true" auth="true"/> + <event type="service" invoke="addPortalPageColumn"/> + <response name="success" type="request" value="dashboard"/> + <response name="error" type="request" value="dashboard"/> + </request-map> + <request-map uri="deletePortalPageColumn"> + <security https="true" auth="true"/> + <event type="service" invoke="deletePortalPageColumn"/> + <response name="success" type="request" value="dashboard"/> + <response name="error" type="request" value="dashboard"/> + </request-map> <!-- View Mappings --> <view-map name="dashboard" type="screen" page="component://common/widget/PortalPageScreens.xml#dashboard"/> Added: ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl?rev=724618&view=auto ============================================================================== --- ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl (added) +++ ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl Mon Dec 8 22:17:35 2008 @@ -0,0 +1,40 @@ +<#-- +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. +--> + +<#assign selected = headerItem?default("void")> +<div id="app-navigation"> + <h2>Example Dashboard</h2> + <ul> + <#if userLogin?has_content> + <li <#if selected = "${uiLabelMap.ExampleExample}"> class="selected"</#if>><a href="<@ofbizUrl>FindExample?portalPageId=${uiLabelMap.ExampleExample}</@ofbizUrl>">${uiLabelMap.ExampleExample}</a></li> + <li <#if selected = "${uiLabelMap.ExampleFeature}"> class="selected"</#if>><a href="<@ofbizUrl>FindExampleFeature?portalPageId=${uiLabelMap.ExampleFeature}</@ofbizUrl>">${uiLabelMap.ExampleFeature}</a></li> + <li <#if selected = "${uiLabelMap.ExampleFormWidgetExamples}"> class="selected"</#if>><a href="<@ofbizUrl>FormWidgetExamples?portalPageId=${uiLabelMap.ExampleFormWidgetExamples}</@ofbizUrl>">${uiLabelMap.ExampleFormWidgetExamples}</a></li> + <li <#if selected = "Ajax Examples"> class="selected"</#if>><a href="<@ofbizUrl>authview/findExampleAjax?portalPageId=Ajax Examples</@ofbizUrl>">Ajax Examples</a></li> + <#list pages as page> + <li<#if selected = "${page.portalPageId}"> class="selected"</#if>><a href="<@ofbizUrl>dashboardExample?portalPageId=${page.portalPageId}</@ofbizUrl>">${page.portalName}</a></li> + </#list> + <li class="opposed"><a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li> + <#--li class="opposed"><a href="http://docs.ofbiz.org/display/OFBENDUSER/My+Page?decorator=printable" target="_blank">${uiLabelMap.CommonHelp}</a></li>--> + <li class="opposed"><a href="<@ofbizUrl>ManagePortalPages</@ofbizUrl>">Dashboard</a></li> + <#else> + <li class="opposed"><a href="<@ofbizUrl>${checkLoginUrl?if_exists}</@ofbizUrl>">${uiLabelMap.CommonLogin}</a></li> + </#if> + </ul> + <br class="clear" /> +</div> \ No newline at end of file Propchange: ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl Mon Dec 8 22:17:35 2008 @@ -45,7 +45,7 @@ <tr> <td> <div class="h2"> - <a href="<@ofbizUrl>createPortalPagePortlet?portalPortletId=${portalPortlet.portalPortletId}&portalPageId=${parameters.portalPageId}&configurePortalPage=true</@ofbizUrl>">${portalPortlet.portletName}</a> + <a href="<@ofbizUrl>createPortalPagePortlet?portalPortletId=${portalPortlet.portalPortletId}&portalPageId=${parameters.portalPageId}&columnSeqId=${parameters.columnSeqId}&configurePortalPage=true</@ofbizUrl>">${portalPortlet.portletName}</a> </div> <div class="tabletext"> ${portalPortlet.description} Modified: ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl Mon Dec 8 22:17:35 2008 @@ -27,35 +27,9 @@ </li> </#if> - <#if (portalPages.size() > 1)> - <li id="portal-page-select"> - <select name="selectPortal" onchange="window.location=this[this.selectedIndex].value;"> - <option>${uiLabelMap.CommonSelectPortalPage}</option> - <#list portalPages as portalPage> - <#if (currentPortalPage.portalPageId != portalPage.portalPageId)> - <option value="<@ofbizUrl>dashboard?portalPageId=${portalPage.portalPageId}</@ofbizUrl>">${portalPage.portalName}</option> - </#if> - </#list> - </select> - </li> - </#if> - - <li id="manage-portal-page"> - <a href="<@ofbizUrl>ManagePortalPages?portalPageId=${currentPortalPage.portalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonManagePortalPages}</a> - </li> - - <li id="config-on-off"> - ${uiLabelMap.CommonConfigure} - <#if configurePortalPage?has_content> - ON | <a href="<@ofbizUrl>dashboard?portalPageId=${currentPortalPage.portalPageId}</@ofbizUrl>" class="buttontext">OFF</a> - <#else> - <a href="<@ofbizUrl>dashboard?portalPageId=${currentPortalPage.portalPageId}&configurePortalPage=true</@ofbizUrl>" class="buttontext">ON</a> | OFF - </#if> - </li> - <#if configurePortalPage?has_content> - <li id="add-portlet"> - <a href="<@ofbizUrl>AddPortlet?portalPageId=${currentPortalPage.portalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddAPortlet}</a> + <li id="add-column"> + <a href="<@ofbizUrl>addPortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&configurePortalPage=true</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddColumn}</a> </li> </#if> @@ -64,6 +38,25 @@ </div> <table width="100%"> + <#if configurePortalPage?has_content> + <tr> + <#list portalPageColumnList?if_exists as portalPageColumn> + <td class="manage-portal-column-toolbar"> + <ul> + <li id="delete-column"> + <a href="<@ofbizUrl>deletePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&configurePortalPage=true</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a> + </li> + <li id="add-portlet"> + <a href="<@ofbizUrl>AddPortlet?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddAPortlet}</a> + </li> + </ul> + </td> + <#if portalPageColumn_has_next> + <td width="5px"> </td> + </#if> + </#list> + </tr> + </#if> <tr> <#list portalPageColumnList?if_exists as portalPageColumn> <td style="vertical-align: top;"<#if portalPageColumn.columnWidthPixels?has_content> width="${portalPageColumn.columnWidthPixels}"</#if>> @@ -147,4 +140,4 @@ <#else/> <h2>No portal page data found. You may not have the necessary seed or other data for it.</h2> -</#if> +</#if> \ No newline at end of file Added: ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl?rev=724618&view=auto ============================================================================== --- ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl (added) +++ ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl Mon Dec 8 22:17:35 2008 @@ -0,0 +1,49 @@ +<#-- +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. +--> + +<div id="manage-portal-toolbar"> + <ul> + <#if currentPortalPage.portalName?has_content> + <li id="portal-page-name"> + ${currentPortalPage.portalName} + </li> + </#if> + + <#if (portalPages.size() > 1)> + <li id="portal-page-select"> + <select name="selectPortal" onchange="window.location=this[this.selectedIndex].value;"> + <option>${uiLabelMap.CommonSelectPortalPage}</option> + <#list portalPages as portalPage> + <#if (currentPortalPage.portalPageId != portalPage.portalPageId)> + <option value="<@ofbizUrl>dashboard?portalPageId=${portalPage.portalPageId}</@ofbizUrl>">${portalPage.portalName}</option> + </#if> + </#list> + </select> + </li> + </#if> + + <#if configurePortalPage?has_content> + <li id="add-portlet"> + <a href="<@ofbizUrl>AddPortlet?portalPageId=${currentPortalPage.portalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddAPortlet}</a> + </li> + </#if> + + </ul> + <br class="clear"/> +</div> \ No newline at end of file Propchange: ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/framework/common/widget/PortalPageForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageForms.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/PortalPageForms.xml (original) +++ ofbiz/trunk/framework/common/widget/PortalPageForms.xml Mon Dec 8 22:17:35 2008 @@ -32,7 +32,7 @@ </actions> <field name="portalPageId" title="${uiLabelMap.CommonId}" sort-field="true"> - <hyperlink description="${portalPageId}" target="dashboard?portalPageId=${portalPageId}"/> + <hyperlink description="${portalPageId}" target="dashboard?portalPageId=${portalPageId}&configurePortalPage=true"/> </field> <field name="portalName" title="${uiLabelMap.CommonName}" id-name="portalName" widget-style="tabletext" sort-field="true"> <display> @@ -50,15 +50,17 @@ </in-place-editor> </display> </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink target="deletePortalPage?portalPageId=${portalPageId}&ownerUserLoginId=${userLogin.userLoginId}" description="${uiLabelMap.CommonDelete}"/> + </field> </form> <form name="NewPortalPage" type="single" target="createPortalPage" title="" default-map-name="PortalPagemap"> <actions> <set from-field="userLogin.userLoginId" field="ownerUserLoginId"/> - </actions> - + </actions> <auto-fields-service service-name="createPortalPage"/> - <field name="ownerUserLoginId" > + <field name="ownerUserLoginId"> <hidden/> </field> <field name="sequenceNum"> Modified: ofbiz/trunk/framework/common/widget/PortalPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageScreens.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/PortalPageScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/PortalPageScreens.xml Mon Dec 8 22:17:35 2008 @@ -25,12 +25,12 @@ <section> <actions> <set field="portalPageId" from-field="parameters.portalPageId" default-value="DEFAULT"/> - <entity-one entity-name="PortalPage" value-name="currentPortalPage"/> + <entity-one entity-name="PortalPage" value-name="currentPortalPage"/> <entity-condition entity-name="PortalPage" list-name="portalPageList"> <condition-expr field-name="ownerUserLoginId" env-name="userLogin.userLoginId"/> </entity-condition> - <set field="portalPages[]" from-field="selectedPortalPage"/> + <set field="portalPages" from-field="portalPageList"/> <entity-condition entity-name="PortalPageColumn" list-name="portalPageColumnList"> <condition-expr field-name="portalPageId" env-name="portalPageId"/> @@ -46,6 +46,8 @@ <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> + <include-form name="ListPortalPages" location="component://common/widget/PortalPageForms.xml"/> + <include-form name="NewPortalPage" location="component://common/widget/PortalPageForms.xml"/> <platform-specific><html><html-template location="component://common/webcommon/portal/portalPage.ftl"/></html></platform-specific> </decorator-section> </decorator-screen> Modified: ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml (original) +++ ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml Mon Dec 8 22:17:35 2008 @@ -170,10 +170,12 @@ <request-map uri="ListExampleFormOnly"><security https="true" auth="false"/><response name="success" type="view" value="ListExampleFormOnly"/></request-map> <request-map uri="CreateExampleFormOnly"><security https="true" auth="false"/><response name="success" type="view" value="CreateExampleFormOnly"/></request-map> + <request-map uri="dashboardExample"><security https="true" auth="false"/><response name="success" type="view" value="dashboardExample"/></request-map> <!-- end of request mappings --> <!-- View Mappings --> <view-map name="main" type="screen" page="component://example/widget/example/CommonScreens.xml#main"/> + <view-map name="dashboardExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#DisplayExamplePage"/> <view-map name="help" type="screen" page="component://example/widget/example/ExampleScreens.xml#help"/> <view-map name="FindExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#FindExample"/> Modified: ofbiz/trunk/framework/example/widget/example/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/CommonScreens.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/CommonScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/CommonScreens.xml Mon Dec 8 22:17:35 2008 @@ -22,27 +22,30 @@ xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> <screen name="main-decorator"> - <!-- The main-decorator screen 'wraps' or 'decorates' all of the screens in the - Example component. It is also decorated - by the GlobalDecorator screen. --> <section> <actions> - <!-- base/top/most specific map first, then more common map added for shared labels. - Setting things up this way enables a component to redefine the more common - UI labels. --> + <!-- base/top/specific map first, then more common map added for shared labels --> <property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> - <!-- The layoutSettings field is a Map that is used to pass variables and layout - information to the GlobalDecorator and any templates that it uses. --> + <set field="layoutSettings.companyName" from-field="uiLabelMap.ExampleCompanyName" global="true"/> <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.ExampleCompanySubtitle" global="true"/> <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set, - then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. --> + then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. --> <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.jpg" global="true"/>--> + <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> --> <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> --> + <!-- TODO: Use transform to specify component URI --> + <set field="layoutSettings.companyName" from-field="uiLabelMap.ExampleCompanyName" global="true"/> + <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.ExampleCompanySubtitle" global="true"/> <set field="activeApp" value="example" global="true"/> - <set field="applicationMenuName" value="ExampleAppBar" global="true"/> - <set field="applicationMenuLocation" value="component://example/widget/example/ExampleMenus.xml" global="true"/> + <!--set field="applicationMenuName" value="ExampleAppBar" global="true"/> + <set field="applicationMenuLocation" value="component://example/widget/example/ExampleMenus.xml" global="true"/--> + <set field="appheaderTemplate" value="component://common/webcommon/portal/appheader.ftl"/> + <entity-and entity-name="PortalPage" list-name="pages"> + <field-map field-name="ownerUserLoginId" env-name="userLogin.userLoginId"/> + </entity-and> </actions> <widgets> <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/> @@ -175,19 +178,7 @@ the user. --> <section> <widgets> - <decorator-screen name="main-decorator"> - <decorator-section name="body"> - <screenlet title="${uiLabelMap.ExampleMainPage}"> - <section> - <condition><if-empty field-name="userLogin"/></condition> - <widgets> - <container><label text="${uiLabelMap.ExampleMessage}"/></container> - </widgets> - </section> - <label text="${uiLabelMap.ExampleWelcome}"/> - </screenlet> - </decorator-section> - </decorator-screen> + <include-screen name="FindExample" location="component://example/widget/example/ExampleScreens.xml"/> </widgets> </section> </screen> Modified: ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml Mon Dec 8 22:17:35 2008 @@ -25,7 +25,7 @@ <section> <actions> <set field="layoutSettings.styleSheets[+0]" value="/images/prototypejs/scriptaculouscontrols.css" global="true"/> - <set field="headerItem" value="AjaxExample"/> + <set field="headerItem" value="Ajax Examples"/> <set field="titleProperty" value="PageTitleFindExample"/> <set field="exampleCtx" from-field="parameters"/> </actions> Modified: ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml Mon Dec 8 22:17:35 2008 @@ -25,7 +25,7 @@ <screen name="FindExampleFeature"> <section> <actions> - <set field="headerItem" value="ExampleFeature"/> + <set field="headerItem" value="Feature"/> <set field="titleProperty" value="PageTitleFindExampleFeature"/> <set field="exampleFeatureCtx" from-field="parameters"/> </actions> Modified: ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml Mon Dec 8 22:17:35 2008 @@ -21,14 +21,13 @@ <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> - <menu name="ExampleAppBar" title="${uiLabelMap.ExampleApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <!--menu name="ExampleAppBar" title="${uiLabelMap.ExampleApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="Example" 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="AjaxExample" title="Ajax Examples"><link target="authview/findExampleAjax"/></menu-item> - <!-- Right Side Items --> - <menu-item name="Dashboard" title="Dashboard" align-style="opposed"><link target="dashboard"/></menu-item> - </menu> + <menu-item name="Dashboard" title="Dashboard" align-style="opposed"><link target="ManagePortalPages?portalPageId=${currentPortalPage.portalPageId}"/></menu-item> + </menu--> <menu name="EditExample" default-selected-style="selected" type="simple" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="tabButtonItem"> Modified: ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml Mon Dec 8 22:17:35 2008 @@ -148,5 +148,35 @@ </widgets> </section> </screen> - + + <screen name="DisplayExamplePage"> + <section> + <actions> + <set field="portalPageId" from-field="parameters.portalPageId" default-value="DEFAULT"/> + <set field="headerItem" from-field="portalPageId"/> + <entity-one entity-name="PortalPage" value-name="currentPortalPage"/> + + <entity-condition entity-name="PortalPage" list-name="portalPageList"> + <condition-expr field-name="ownerUserLoginId" env-name="userLogin.userLoginId"/> + </entity-condition> + <set field="portalPages[]" from-field="selectedPortalPage"/> + + <entity-condition entity-name="PortalPageColumn" list-name="portalPageColumnList"> + <condition-expr field-name="portalPageId" env-name="portalPageId"/> + <order-by field-name="columnSeqId"/> + </entity-condition> + <entity-condition entity-name="PortalPagePortletView" list-name="portalPagePortletViewList"> + <condition-expr field-name="portalPageId" env-name="portalPageId"/> + <order-by field-name="sequenceNum"/> + </entity-condition> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <platform-specific><html><html-template location="component://common/webcommon/portal/portalPage.ftl"/></html></platform-specific> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml Mon Dec 8 22:17:35 2008 @@ -24,7 +24,7 @@ <screen name="FormWidgetExamples"> <section> <actions> - <set field="headerItem" value="FormWidgetExamples"/> + <set field="headerItem" value="Form Widget Examples"/> <set field="titleProperty" value="PageTitleFormWidgetExamples"/> </actions> <widgets> Modified: ofbiz/trunk/framework/images/webapp/images/maincss.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/maincss.css?rev=724618&r1=724617&r2=724618&view=diff ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/maincss.css (original) +++ ofbiz/trunk/framework/images/webapp/images/maincss.css Mon Dec 8 22:17:35 2008 @@ -2080,7 +2080,7 @@ #manage-portal-toolbar #config-on-off, #manage-portal-toolbar #manage-portal-page, -#manage-portal-toolbar #add-portlet { +#manage-portal-toolbar #add-column { float: right; } @@ -2088,3 +2088,8 @@ font-size: 1.5em; font-weight: bold; } + +.manage-portal-column-toolbar #add-portlet, +.manage-portal-column-toolbar #delete-column { +float: right; +} |
Free forum by Nabble | Edit this page |