ilscipio/scipio-erp

View on GitHub
applications/cms/widget/LookupScreens.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="LookupMediaImage">
        <section>
            <condition>
                <if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
            </condition>
            <actions>
                <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="title" value="Lookup Media Image"/>
                <set field="queryString" from-field="result.queryString"/>
                <set field="entityName" value="Content"/>
                <set field="searchFields" value="[contentId, contentName]"/>
                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition('contentTypeId', 'SCP_MEDIA');}"/>
            </actions>
            <widgets>
                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
                    <decorator-section name="search-options">
                        <include-form name="lookupMediaImage" location="component://cms/widget/FieldLookupForms.xml"/>
                    </decorator-section>
                    <decorator-section name="search-results">
                        <include-form name="listLookupMediaImage" location="component://cms/widget/FieldLookupForms.xml"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
</screens>