ilscipio/scipio-erp

View on GitHub
framework/webtools/widget/ArtifactInfoScreens.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="ArtifactInfo" transaction-timeout="180">
        <section>
            <condition>
                <if-has-permission permission="ARTIFACT_INFO_VIEW"/>
            </condition>
            <actions>
                <set field="titleProperty" value="WebtoolsArtifactInfo"/>
                <set field="activeSubMenuItem" value="artifactInfo"/>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonArtifactDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific><html><html-template location="component://webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl"/></html></platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
            <fail-widgets>
                <label style="common-msg-error-perm">${uiLabelMap.WebtoolsCannotViewArtifactInfoPages}</label>
            </fail-widgets>
        </section>
    </screen>
    <screen name="ViewComponents">
        <section>
            <actions>
                <set field="titleProperty" value="CommonComponents"/><!-- SCIPIO: switched: <set field="titleProperty" value="WebtoolsViewComponents"/>-->
                <set field="activeSubMenuItem" value="viewents"/>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ComponentList.groovy"/>
                <set field="viewSize" value="30"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonArtifactDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <include-form name="ComponentList" location="component://webtools/widget/ArtifactInfoForms.xml"/>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="ViewComponent"><!-- SCIPIO: NOTE: This used to be "TestSuiteInfo" itself -->
        <section>
            <actions>
                <set field="titleProperty" value="CommonComponent"/><!-- SCIPIO: switched: <set field="titleProperty" value="WebtoolsViewComponents"/>-->
                <set field="activeSubMenuItem" value="viewents"/>
                <!-- SCIPIO: presence check -->
                <script lang="groovy"><![CDATA[
                    compName = parameters.compName?.toString();
                    context.compName = compName;
                    compEnabled = org.ofbiz.base.component.ComponentConfig.isComponentEnabled(compName);
                    context.compEnabled = compEnabled;
                ]]></script>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/artifactinfo/TestSuiteInfo.groovy"/>
                <set field="titleFormat" value="\${finalTitle}: ${compName}"/><!-- SCIPIO -->
            </actions>
            <widgets>
                <decorator-screen name="CommonArtifactDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <section>
                            <condition><if-true field="compEnabled"/></condition>
                            <widgets>
                                <screenlet title="Test Suites"><!--title="Component: ${parameters.compName}"-->
                                    <include-form name="TestSuiteInfo" location="component://webtools/widget/ArtifactInfoForms.xml"/>
                                </screenlet>
                            </widgets>
                            <fail-widgets>
                                <label style="common-msg-error" text="${uiLabelMap.WebtoolsComponentNotFoundOrNotEnabled}"/>
                            </fail-widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="TestSuiteInfo">
        <section>
            <widgets>
                <include-screen name="ViewComponent"/><!-- SCIPIO: Backward-compat for TestSuiteInfo -->
            </widgets>
        </section>
    </screen>
</screens>