ilscipio/scipio-erp

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

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->

<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">

    <screen name="FindProductPriceRule">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleFindPriceRule"/><!-- PageTitleFindProductPriceRule -->
                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/>
                <property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/>
                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonPriceDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet title="${uiLabelMap.ProductGlobalPriceRules}">
                            <include-form name="FindProductPriceRules" location="component://product/widget/catalog/PriceForms.xml"/>
                        </screenlet>
                        <screenlet title="${uiLabelMap.ProductAddPriceRule}">
                            <include-form location="component://product/widget/catalog/PriceForms.xml" name="AddPriceRules"/>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <!-- Old screen kept for now, in case some would prefer the old way. Another option is to use an input field with Id instead of a drop-down in the new screen below (see also setPriceRulesCondEventJs.ftl and top of getAssociatedPriceRulesConds service) -->
    <!--screen name="EditProductPriceRules">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEditProductPriceRules"/>

                <script location="component://product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules_old.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonPriceDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://product/webapp/catalog/price/EditProductPriceRules.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen-->
    <screen name="EditProductPriceRules">
        <section>
            <actions>
                <set field="titleProperty" value="ProductPriceRule"/><!-- PageTitleEditProductPriceRules -->

                <script location="component://product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonPriceDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific><html><html-template location="component://product/webapp/catalog/price/setPriceRulesCondEventJs.ftl"/></html></platform-specific>
                        <include-menu name="PriceRulesButtonBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
                        <screenlet><!--  title="${uiLabelMap.ProductPriceRuleId} [${parameters.productPriceRuleId}]" -->
                            <label style="heading+4" text="${uiLabelMap.ProductConditionsActionsRemoveBefore}"/>
                            <horizontal-separator/>
                            <include-form name="EditProductPriceRule" location="component://product/widget/catalog/PriceForms.xml"/>
                            <horizontal-separator/>
                            <label style="heading+4" text="${uiLabelMap.ProductConditionsThenActions}"/>
                            <horizontal-separator/>
                            <screenlet title="${uiLabelMap.ProductConditions}">
                                <include-form name="EditProductPriceRulesCond" location="component://product/widget/catalog/PriceForms.xml"/>
                                <horizontal-separator/>
                                <include-form name="AddProductPriceRulesCond" location="component://product/widget/catalog/PriceForms.xml"/>
                            </screenlet>
                            <screenlet title="${uiLabelMap.ProductActions}">
                                <include-form name="EditProductPriceRulesAction" location="component://product/widget/catalog/PriceForms.xml"/>
                                <horizontal-separator/>
                                <include-form name="AddProductPriceRulesAction" location="component://product/widget/catalog/PriceForms.xml"/>
                            </screenlet>
                        </screenlet>
                    </decorator-section>                    
                </decorator-screen>
            </widgets>
        </section>
    </screen>
</screens>