ilscipio/scipio-erp

View on GitHub
applications/content/widget/layout/LayoutMenus.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.
-->

<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
    <menu name="LayoutButtonBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="content" default-associated-content-id="${userLogin.userLoginId}" title="">
        <menu-item name="ListLayout" title="${uiLabelMap.ContentListOwnCreatedTemplates}" >
            <link target="ListLayout" target-window="_top" />
        </menu-item>
        <menu-item name="FindLayout" title="${uiLabelMap.CommonFind}" widget-style="+${styles.action_nav} ${styles.action_find}">
            <link target="FindLayout" target-window="_top" />
        </menu-item>
        <menu-item name="EditLayout" title="${uiLabelMap.CommonEdit}" widget-style="+${styles.action_nav} ${styles.action_update}">
            <condition>
                <and>
                    <not><if-empty field="parameters.contentId"/></not>
                    <not><if-empty field="parameters.drDataResourceId"/></not>
                </and>
            </condition>
            <link target="EditLayout" target-window="_top"  >
                <parameter param-name="contentId" from-field="parameters.contentId"/>
                <parameter param-name="drDataResourceId" from-field="parameters.drDataResourceId"/>
            </link>
        </menu-item>
        <menu-item name="EditLayoutSubContent" title="${uiLabelMap.ContentSubContent}">
            <condition>
                <and>
                    <not><if-empty field="parameters.contentId"/></not>
                    <not><if-empty field="parameters.drDataResourceId"/></not>
                </and>
            </condition>
            <link target="EditLayoutSubContent" target-window="_top">
                <parameter param-name="contentId" from-field="parameters.contentId"/>
                <parameter param-name="drDataResourceId" from-field="parameters.drDataResourceId"/>
            </link>
        </menu-item>
        <menu-item name="EditLayoutText" title="${uiLabelMap.ContentText}" >
            <condition>
                <and>
                    <not><if-empty field="parameters.contentId"/></not>
                    <not><if-empty field="parameters.drDataResourceId"/></not>
                </and>
            </condition>
            <link target="EditLayoutText" target-window="_top"  >
                <parameter param-name="contentId" from-field="parameters.contentId"/>
                <parameter param-name="drDataResourceId" from-field="parameters.drDataResourceId"/>
            </link>
        </menu-item>
        <menu-item name="EditLayoutHtml" title="${uiLabelMap.ContentHtml}" >
            <condition>
                <and>
                    <not><if-empty field="parameters.contentId"/></not>
                    <not><if-empty field="parameters.drDataResourceId"/></not>
                </and>
            </condition>
            <link target="EditLayoutHtml" target-window="_top"  >
                <parameter param-name="contentId" from-field="parameters.contentId"/>
                <parameter param-name="drDataResourceId" from-field="parameters.drDataResourceId"/>
            </link>
        </menu-item>
        <menu-item name="EditLayoutImage" title="${uiLabelMap.ContentImage}" >
            <condition>
                <and>
                    <not><if-empty field="parameters.contentId"/></not>
                    <not><if-empty field="parameters.drDataResourceId"/></not>
                </and>
            </condition>
            <link target="EditLayoutImage" target-window="_top"  >
                <parameter param-name="contentId" from-field="parameters.contentId"/>
                <parameter param-name="drDataResourceId" from-field="parameters.drDataResourceId"/>
            </link>
        </menu-item>
        <menu-item name="EditLayoutUrl" title="${uiLabelMap.ContentUrl}" >
            <condition>
                <and>
                    <not><if-empty field="parameters.contentId"/></not>
                    <not><if-empty field="parameters.drDataResourceId"/></not>
                </and>
            </condition>
            <link target="EditLayoutUrl" target-window="_top"  >
                <parameter param-name="contentId" from-field="parameters.contentId"/>
                <parameter param-name="drDataResourceId" from-field="parameters.drDataResourceId"/>
            </link>
        </menu-item>
    </menu>
    
    <menu name="LayoutSideBar" extends="CommonSideBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="content" default-associated-content-id="${userLogin.userLoginId}" title="">
        <include-elements menu-name="LayoutButtonBar" recursive="includes-only" />
    </menu>
    
</menus>