ilscipio/scipio-erp

View on GitHub
applications/product/widget/catalog/CatalogForms.xml

Summary

Maintainability
Test Coverage
<?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="http://ofbiz.apache.org/dtds/widget-form.xsd">
    <form name="FindCatalog" type="single" target="FindCatalog" title="" default-map-name="catalog" header-row-style="header-row"
       > <!-- orig: default-table-style=-style="basic-table" -->
        <field name="prodCatalogId" title="${uiLabelMap.CommonId}">
            <text-find />
        </field>
        <field name="catalogName" title="${uiLabelMap.CommonName}" position="2">
            <text-find />
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}">
            <submit button-type="button" />
        </field>
    </form>

    <form name="ListCatalog" list-name="listIt" target="" title="" type="list" paginate-target="FindCatalog" odd-row-style="alternate-row"
        header-row-style="header-row-2"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <set field="entityName" value="ProdCatalog" />
            <set field="parameters.sortField" from-field="parameters.sortField" default-value="+catalogName" />
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters" />
                <field-map field-name="entityName" from-field="entityName" />
                <field-map field-name="orderBy" from-field="parameters.sortField" />
                <field-map field-name="viewIndex" from-field="viewIndex" />
                <field-map field-name="viewSize" from-field="viewSize" />
                <field-map field-name="noConditionFind" value="Y" />
            </service>
        </actions>
        <field name="prodCatalogId" title="${uiLabelMap.CommonId}" sort-field="true" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" description="${prodCatalogId}" target="EditCatalog">
                <parameter param-name="prodCatalogId" />
            </hyperlink>
        </field>

        <field name="prodCatalogId" sort-field="true" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="EditProdCatalog?prodCatalogId=${prodCatalogId}" description="${prodCatalogId}" />
        </field>
        <field name="catalogName" title="${uiLabelMap.CommonName}" sort-field="true">
            <display />
        </field>
        <field name="useQuickAdd" title="${uiLabelMap.ProductUseQuickAdd}" sort-field="true">
            <display />
        </field>
    </form>

    <!-- SCIPIO: EditProdCatalog form moved to ./applications/product/widget/catalog/CatalogScreens.xml#ScipioEditProdCatalog (can't be removed yet, still references I haven't covered) -->
    <form name="EditProdCatalog" type="single" target="updateProdCatalog" title="" default-map-name="prodCatalog"
        header-row-style="header-row" default-entity-name="ProdCatalog"> <!-- orig: default-table-style=-style="basic-table" -->
        <alt-target use-when="prodCatalog==null" target="createProdCatalog" />
        <field use-when="prodCatalog!=null" name="prodCatalogId" title="${uiLabelMap.CommonId}"
            tooltip="${uiLabelMap.ProductNotModificationRecreatingProductCatalog}.">
            <display />
        </field>
        <field use-when="prodCatalog==null&amp;&amp;prodCatalogId!=null" name="prodCatalogId" title="${uiLabelMap.CommonId}"
            tooltip="${uiLabelMap.ProductCouldNotFindProductCatalogWithId} [${prodCatalogId}]">
            <text size="20" maxlength="20" />
        </field>
        <!-- this to be taken care of with auto-fields-service as soon as it uses entity field info too -->
        <field use-when="prodCatalog==null&amp;&amp;prodCatalogId==null" name="prodCatalogId" title="${uiLabelMap.CommonId}">
            <text size="20" maxlength="20" />
        </field>

        <field name="catalogName" title="${uiLabelMap.CommonName}" position="2">
            <text size="30" maxlength="60" />
        </field>
        <field name="styleSheet" title="${uiLabelMap.ProductStyleSheet}">
            <text size="60" maxlength="250" />
        </field>
        <field name="headerLogo" title="${uiLabelMap.ProductHeaderLogo}">
            <text size="60" maxlength="250" />
        </field>
        <field name="contentPathPrefix" title="${uiLabelMap.ProductContentPathPrefix}" tooltip="${uiLabelMap.ProductPrependedImageContentPaths}">
            <text size="60" maxlength="250" />
        </field>
        <field name="templatePathPrefix" title="${uiLabelMap.ProductTemplatePathPrefix}" tooltip="${uiLabelMap.ProductPrependedTemplatePaths}">
            <text size="60" maxlength="250" />
        </field>

        <field name="useQuickAdd" title="${uiLabelMap.ProductUseQuickAdd}">
            <drop-down allow-empty="false" no-current-selected-key="Y">
                <option key="Y" description="${uiLabelMap.CommonY}" />
                <option key="N" description="${uiLabelMap.CommonN}" />
            </drop-down>
        </field>
        <field name="viewAllowPermReqd" title="${uiLabelMap.ProductCategoryViewAllowPermReqd}">
            <drop-down allow-empty="false" no-current-selected-key="N">
                <option key="Y" description="${uiLabelMap.CommonY}" />
                <option key="N" description="${uiLabelMap.CommonN}" />
            </drop-down>
        </field>
        <field name="purchaseAllowPermReqd" title="${uiLabelMap.ProductCategoryPurchaseAllowPermReqd}" position="2">
            <drop-down allow-empty="false" no-current-selected-key="N">
                <option key="Y" description="${uiLabelMap.CommonY}" />
                <option key="N" description="${uiLabelMap.CommonN}" />
            </drop-down>
        </field>

        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}">
            <submit button-type="button" />
        </field>
    </form>

    <!-- SCIPIO: AddProdCatalogToParty form moved to ./applications/product/widget/catalog/CatalogScreens.xml#ScipioAddProdCatalogToParty (can't be removed yet, still references I haven't covered) -->
    <form name="AddProdCatalogToParty" type="single" target="addProdCatalogToParty" title="" header-row-style="header-row"
       > <!-- orig: default-table-style=-style="basic-table" -->
        <auto-fields-service service-name="addProdCatalogToParty" />
        <field name="prodCatalogId" map-name="prodCatalog">
            <hidden />
        </field>
        <field name="partyId" title="${uiLabelMap.CommonParty}">
            <lookup target-form-name="LookupPartyName" />
        </field>
        <field name="roleTypeId" title="${uiLabelMap.PartyRole}" position="2">
            <drop-down no-current-selected-key="_NA_">
                <entity-options entity-name="RoleType" description="${description}">
                    <entity-order-by field-name="description" />
                </entity-options>
            </drop-down>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}">
            <date-time type="date" />
        </field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2">
            <date-time type="date" />
        </field>
        <field name="sequenceNum" title="${uiLabelMap.CommonSequenceNum}" position="2">
            <text />
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}">
            <submit button-type="button" />
        </field>
    </form>

    <!-- SCIPIO: UpdateProdCatalogToParty form moved to ./applications/product/widget/catalog/CatalogScreens.xml#ScipioProdCatalogPartyList (can't be removed yet, still references I haven't covered) -->
    <form name="UpdateProdCatalogToParty" type="list" target="updateProdCatalogToParty" title="" list-name="prodCatalogRoleList"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <row-actions>
            <entity-one entity-name="PartyNameView" value-field="catalogParty"/>
        </row-actions>
        <auto-fields-service service-name="updateProdCatalogToParty" />
        <field name="prodCatalogId">
            <hidden />
        </field>
        <!-- three possibilities for the Party: person, partyGroup, neither... just print everything and if it's empty, no biggie -->
        <field name="partyId" title="${uiLabelMap.PartyParty}">
            <display-entity entity-name="PartyNameView" description=" " also-hidden="true" cache="false">
                <sub-hyperlink target-type="inter-app" link-style="${styles.link_nav_info_name_long}" target="/partymgr/control/viewprofile"
                    description="${catalogParty.groupName}${catalogParty.personalTitle} ${catalogParty.firstName} ${catalogParty.middleName} ${catalogParty.lastName} ${suffix}">
                    <parameter param-name="party_id" from-field="partyId" />
                </sub-hyperlink>
            </display-entity>
        </field>
        <field name="roleTypeId" title="${uiLabelMap.PartyRole}">
            <display-entity entity-name="RoleType" />
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}">
            <display type="date" />
        </field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}">
            <date-time type="date" />
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}">
            <submit button-type="button" />
        </field>
        <field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="removeProdCatalogFromParty" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="prodCatalogId" />
                <parameter param-name="partyId" />
                <parameter param-name="roleTypeId" />
                <parameter param-name="fromDate" />
            </hyperlink>
        </field>
    </form>

    <!-- SCIPIO: CreateProductStoreCatalog form moved to ./applications/product/widget/catalog/CatalogScreens.xml#ScipioAddProdCatalogToStore (can't be removed yet, still references I haven't covered) -->
    <form name="CreateProductStoreCatalog" type="single" target="createProdCatalogStore" title="" header-row-style="header-row"
       > <!-- orig: default-table-style=-style="basic-table" -->
        <field name="prodCatalogId" map-name="prodCatalog">
            <hidden />
        </field>
        <field name="productStoreId" title="${uiLabelMap.CommonStore}">
            <drop-down>
                <entity-options entity-name="ProductStore" description="${storeName}">
                    <entity-order-by field-name="storeName" />
                </entity-options>
            </drop-down>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}">
            <date-time type="date" />
        </field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2">
            <date-time type="date" />
        </field>
        <field name="sequenceNum" title="${uiLabelMap.CommonSequenceNum}" position="2">
            <text />
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}">
            <submit button-type="button" />
        </field>
    </form>

    <!-- SCIPIO: UpdateProductStoreCatalog form moved to ./applications/product/widget/catalog/CatalogScreens.xml#ScipioProdCatalogStoreList (can't be removed yet, still references I haven't covered) -->
    <form name="UpdateProductStoreCatalog" type="list" target="updateProdCatalogStore" title="" list-name="productStoreCatalogList"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <row-actions>
            <entity-one entity-name="ProductStore" value-field="catalogStore"/>
        </row-actions>
        <field name="prodCatalogId">
            <hidden />
        </field>
        <field name="productStoreId" title="${uiLabelMap.CommonStore}">
            <display-entity entity-name="ProductStore" description=" " also-hidden="true" cache="true">
                <sub-hyperlink link-style="${styles.link_nav_info_idname}" target="EditProductStore"
                    description="${catalogStore.storeName} - ${productStoreId}">
                    <parameter param-name="productStoreId" />
                </sub-hyperlink>
            </display-entity>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}">
            <display type="date" />
        </field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}">
            <date-time type="date" />
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}">
            <submit button-type="button" />
        </field>
        <field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteProdCatalogStore" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="prodCatalogId" />
                <parameter param-name="productStoreId" />
                <parameter param-name="fromDate" />
            </hyperlink>
        </field>
    </form>

    <!-- SCIPIO: EditProdCatalogCategories form moved to ./applications/product/widget/catalog/CatalogScreens.xml#ScipioEditProdCatalogCategories (can't be removed yet, still references I haven't covered) -->
    <form name="EditProdCatalogCategories" type="list" target="updateProductCategoryToProdCatalog" title=""
        list-name="prodCatalogCategories" odd-row-style="alternate-row" paginate-target="EditProdCatalogCategories"> <!-- orig: default-table-style=-style="basic-table" -->
        <row-actions>
            <entity-one entity-name="ProductCategory" value-field="productCategory"/>
        </row-actions>
        <auto-fields-service service-name="updateProductCategoryToProdCatalog" />
        <field name="prodCatalogId">
            <hidden />
        </field>
        <field name="productCategoryId" title="${uiLabelMap.CommonCategory}">
            <display-entity entity-name="ProductCategory" description=" " also-hidden="true" cache="true">
                <sub-hyperlink link-style="${styles.link_nav_info_idname}" target="EditCategory"
                    description="${productCategory.categoryName} - ${productCategoryId}">
                    <parameter param-name="productCategoryId" />
                </sub-hyperlink>
            </display-entity>
        </field>
        <field name="prodCatalogCategoryTypeId" title="${uiLabelMap.CommonType}">
            <display-entity entity-name="ProdCatalogCategoryType" also-hidden="true" cache="true" />
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}">
            <display type="date" />
        </field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}">
            <date-time type="date" />
        </field>
        <field name="sequenceNum" title="${uiLabelMap.CommonSequenceNum}">
            <text />
        </field>
        <field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="removeProductCategoryFromProdCatalog" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="prodCatalogId" />
                <parameter param-name="productCategoryId" />
                <parameter param-name="partyId" />
                <parameter param-name="fromDate" />
                <parameter param-name="prodCatalogCategoryTypeId" />
            </hyperlink>
        </field>
        <field name="makeTopAction" title=" " widget-style="${styles.link_run_session} ${styles.action_update}">
            <hyperlink target="EditCategory" description="${uiLabelMap.ProductMakeTop}" also-hidden="false">
                <parameter param-name="CATALOG_TOP_CATEGORY" from-field="productCategoryId" />
                <parameter param-name="productCategoryId" />
            </hyperlink>
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}">
            <submit button-type="button" />
        </field>
    </form>

    <!-- SCIPIO: addProductCategoryToProdCatalog form moved to ./applications/product/widget/catalog/CatalogScreens.xml#ScipioAddProductCategoryToProdCatalog (can't be removed yet, still references I haven't covered) -->
    <form name="addProductCategoryToProdCatalog" type="single" target="addProductCategoryToProdCatalog" title=""
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <auto-fields-service service-name="addProductCategoryToProdCatalog" />
        <field name="prodCatalogId">
            <hidden />
        </field>
        <field name="productCategoryId" title="${uiLabelMap.CommonCategory}">
            <lookup target-form-name="LookupProductCategory" />
        </field>
        <field name="prodCatalogCategoryTypeId" title="${uiLabelMap.CommonType}" position="2">
            <drop-down>
                <entity-options entity-name="ProdCatalogCategoryType" description="${description}">
                    <entity-order-by field-name="description" />
                </entity-options>
            </drop-down>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}">
            <date-time type="date" />
        </field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2">
            <date-time type="date" />
        </field>
        <field name="sequenceNum" title="${uiLabelMap.CommonSequenceNum}" position="2">
            <text />
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}">
            <submit button-type="button" />
        </field>
    </form>
    
    <form name="activePromotions" type="list" title="" header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->        
        <field name="productCategoryId"><display/></field>
        <field name="productStore"><display/></field>
        <field name="productDate"><display/></field>
        <field name="promoTitle"><display/></field>
        <field name="voucher"><display/></field>
    </form>
    
    <form name="newProducts" type="list" title="" header-row-style="header-row" list-name="products" default-entity-name="Product"> <!-- orig: default-table-style=-style="basic-table" -->        
        <field name="productId"><display/></field>
        <field name="productName"><display/></field>
        <field name="productTypeId"><display/></field>
        <field name="introductionDate"><display/></field>
       <!--  <field name="price"></field> -->
        <!-- <field name="voucher"></field> -->
    </form>
</forms>