Using this widget, a PortalPage can now be easily rendered in any screen. At the bottom of the page an "Edit ON/OFF" button can be used to switch the PortalPage edit mode ON and OFF so that the Portal Page can be edited "in place". All the portlet editing requests are handled using the "save-last-view" request attribute so that a dedicated screen can be shown to set the Portlet attributes and the column width and, when submitted, the user is taken back to the portal page he was editing. Those new requests will be used in a later commit to eliminate all the duplicated ****Adm requests that have been introduced when the Webtools portal admin screen has been created. A simple use of the widget has been added in the Example application. TODO: - At the moment the portal page editing is performed on the portal page itself and no portal derivation from the "main" one is performed. This will be done in a later commit. - The portlet moving controls both manually and by drag and drop have not been implemented yet. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@998570 13f79535-47bb-0310-9956-ffa450edef68
152 lines
10 KiB
XML
152 lines
10 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
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.
|
|
-->
|
|
|
|
<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"
|
|
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">
|
|
<parameter param-name="portalPageId"/>
|
|
<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})">
|
|
<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})">
|
|
<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})">
|
|
<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})">
|
|
<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">
|
|
<display>
|
|
<in-place-editor url="updatePortalPage" cancel-control="button" saving-text="Updating..." text-between-controls=" ">
|
|
<simple-editor/>
|
|
<field-map field-name="portalPageId" from-field="portalPageId"/>
|
|
</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">
|
|
<display>
|
|
<in-place-editor url="updatePortalPage" cancel-control="button" saving-text="Updating..." text-between-controls=" ">
|
|
<simple-editor/>
|
|
<field-map field-name="portalPageId" from-field="portalPageId"/>
|
|
</in-place-editor>
|
|
</display>
|
|
</field>
|
|
<field name="originalPortalPageId"><display-entity entity-name="PortalPage" description="${portalPageName} [${portalPageId}]" key-field-name="portalPageId"/></field>
|
|
<field name="deleteLink" use-when="!ownerUserLoginId.equals("_NA_")" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" >
|
|
<hyperlink target="deletePortalPage" description="${uiLabelMap.CommonDelete}">
|
|
<parameter param-name="portalPageId"/>
|
|
<parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/>
|
|
</hyperlink>
|
|
</field>
|
|
<field name="deleteLink" use-when="!ownerUserLoginId.equals("_NA_")&&originalPortalPageId!=null" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" >
|
|
<hyperlink target="deletePortalPage" description="${uiLabelMap.CommonRevertPortalPage}">
|
|
<parameter param-name="portalPageId"/>
|
|
<parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/>
|
|
</hyperlink>
|
|
</field>
|
|
</form>
|
|
|
|
<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="createButton"><submit button-type="button"/></field>
|
|
</form>
|
|
|
|
<form name="PortletCategoryAndPortlet" type="list" list-name="portletCat" paginate-target="AddPortlet${Adm}" separate-columns="true"
|
|
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
|
|
<field name="portletCategoryId" title="Category">
|
|
<hyperlink description="${portletCategoryId}" target="AddPortlet${Adm}">
|
|
<parameter param-name="portletCategoryId"/>
|
|
<parameter param-name="portalPortletId"/>
|
|
<parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
|
|
<parameter param-name="columnSeqId" from-field="parameters.columnSeqId"/>
|
|
<parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/>
|
|
</hyperlink>
|
|
</field>
|
|
<field name="description" title="${uiLabelMap.CommonDescription}"><display/></field>
|
|
</form>
|
|
|
|
<form name="PortletList" type="list" separate-columns="true" list-name="portlets"
|
|
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
|
|
<actions>
|
|
<entity-and entity-name="PortalPagePortletView" list="portlets">
|
|
<field-map field-name="portalPageId" from-field="parameters.portalPageId"/>
|
|
</entity-and>
|
|
</actions>
|
|
<field name="portletName">
|
|
<hyperlink also-hidden="false" target="showHelp?helpTopic=HELP_${portalPortletId}" description="${portletName}" ></hyperlink>
|
|
</field>
|
|
<field name="description"><display/></field>
|
|
</form>
|
|
|
|
<form name="FindGenericEntity" type="single" target="list${entity}" title="" focus-field-name="idName">
|
|
<field name="idName" title="${uiLabelMap.FormFieldTitle_${pkIdName}"><text size="16"/></field>
|
|
<field name="idName_op" ><hidden value="contains"/></field>
|
|
<field name="idName_ic" ><hidden value="Y"/></field>
|
|
<field name="description" ><text size="16"/></field>
|
|
<field name="description_op" ><hidden value="contains"/></field>
|
|
<field name="description_ic" ><hidden value="Y"/></field>
|
|
<field name="submitButton" title=" " widget-style="smallSubmit">
|
|
<hyperlink target="javascript:ajaxUpdateArea('List${entity}Area', 'list${entity}', $(FindGenericEntity).serialize());" target-type="plain" description="${uiLabelMap.CommonSearch}"/>
|
|
</field>
|
|
</form>
|
|
|
|
<form name="EditPortalPageColumnWidth" type="single" target="updatePortalPageColumn" default-map-name="portalPageColumn">
|
|
<field name="portalPageId"><hidden/></field>
|
|
<field name="columnSeqId"><hidden/></field>
|
|
<field name="columnWidthPixels"><text/></field>
|
|
<field name="columnWidthPercentage"><text/></field>
|
|
<field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
|
|
</form>
|
|
</forms>
|