ilscipio/scipio-erp

View on GitHub
applications/content/widget/compdoc/CompDocMenus.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="empty" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="content" menu-width="100%"
        default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="currentMenuItemName" title="">
    </menu>

    <menu name="find" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="content"
        default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="currentMenuItemName" title="">
        <menu-item name="find" title="${uiLabelMap.CommonFind}">
            <link target="FindCompDocTemplate"/>
        </menu-item>
    </menu>

    <menu name="tree" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="content"
        selected-menuitem-context-field-name="currentMenuItemName" title="">
        <menu-item name="viewtree" title="${uiLabelMap.ContentCompDocViewTree}">
            <condition>
                <or>
                    <if-compare field="contentTypeId" operator="equals" value="COMPDOC_TEMPLATE"></if-compare>
                    <if-compare field="contentTypeId" operator="equals" value="TEMPLATE"></if-compare>
                </or>
            </condition>
            <link target="ViewCompDocTemplateTree">
                <parameter param-name="rootContentId"/>
                <parameter param-name="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="viewtree2" title="${uiLabelMap.ContentCompDocViewTree}">
            <condition>
                <or>
                    <if-compare field="contentTypeId" operator="equals" value="COMPDOC_INSTANCE"></if-compare>
                    <if-compare field="contentTypeId" operator="equals" value="DOCUMENT"></if-compare>
                </or>
            </condition>
            <link target="ViewCompDocInstanceTree">
                <parameter param-name="rootContentId"/>
                <parameter param-name="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="edit" title="${uiLabelMap.CommonEdit}">
            <link target="EditRootCompDoc">
                <parameter param-name="rootContentId"/>
                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="approval" title="${uiLabelMap.ContentCompDocApprovals}">
            <link target="ListContentApproval">
                <parameter param-name="rootContentId"/>
                <parameter param-name="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="revision" title="${uiLabelMap.ContentCompDocRevisions}">
            <link target="ListContentRevisions">
                <parameter param-name="rootContentId"/>
                <parameter param-name="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
    </menu>

    <menu name="subtree" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="content"
        selected-menuitem-context-field-name="currentMenuItemName" title="">
        <menu-item name="viewtree" title="${uiLabelMap.PageTitleViewCompDocTree}">
            <condition>
                <or>
                    <if-compare field="contentTypeId" operator="equals" value="COMPDOC_TEMPLATE"></if-compare>
                    <if-compare field="contentTypeId" operator="equals" value="TEMPLATE"></if-compare>
                </or>
            </condition>
            <link target="ViewCompDocTemplateTree">
                <parameter param-name="rootContentId"/>
                <parameter param-name="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="viewtree2" title="${uiLabelMap.PageTitleViewCompDocTree}">
            <condition>
                <or>
                    <if-compare field="contentTypeId" operator="equals" value="COMPDOC_INSTANCE"></if-compare>
                    <if-compare field="contentTypeId" operator="equals" value="DOCUMENT"></if-compare>
                </or>
            </condition>
            <link target="ViewCompDocInstanceTree">
                <parameter param-name="rootContentId"/>
                <parameter param-name="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="edit" title="${uiLabelMap.CommonEdit}">
            <link target="EditChildCompDoc" >
                <parameter param-name="contentId"/>
                <parameter param-name="itemContentRevisionSeqId"/>
                <parameter param-name="rootContentId"/>
                <parameter param-name="rootContentRevisionSeqId"/>
                <parameter param-name="caFromDate" from-field="parameters.caFromDate"/>
            </link>
        </menu-item>
    </menu>

    <menu name="rootTemplateLine" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml" menu-container-style="+${styles.menu_buttonstyle_alt1}" default-menu-item-name="content"
        selected-menuitem-context-field-name="currentMenuItemName" title="">
        <menu-item name="edit-inplace" title="${contentName}[${contentId}]" widget-style="+h2">
            <link target="EditRootCompDoc">
                <parameter param-name="rootContentId"/>
                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="edit-link" title="${uiLabelMap.CommonEdit}">
            <link target="EditRootCompDoc">
                <parameter param-name="rootContentId"/>
                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="child" title="${uiLabelMap.ContentCompDocChild}">
            <condition>
                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
            </condition>
            <link target="AddChildCompDocTemplate">
                <parameter param-name="rootContentId" from-field="contentId"/>
                <parameter param-name="sequenceNum" value="9999"/>
            </link> <!-- rootContentRevisionSeqId=${rootContentRevisionSeqId}&amp; -->
        </menu-item>
        <menu-item name="latest" title="${uiLabelMap.ContentCompDocCurrentTemplate}">
            <condition>
                <if-compare-field field="mostRecentRevisionSeqId" operator="greater" to-field="rootContentRevisionSeqId"/>
            </condition>
            <link target="ViewCompDocTemplateTree">
                <parameter param-name="rootContentId" from-field="contentId"/>
            </link> <!-- rootContentRevisionSeqId=${rootContentRevisionSeqId}&amp; -->
        </menu-item>
        <!-- on page
        <menu-item name="viewinst" title="View Instances">
            <link target="ViewInstances">
                <parameter param-name="rootContentId"/>
                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="addinst" title="Add Instance">
            <link target="AddRootCompDocInstance">
                <parameter param-name="rootContentId"/>
                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
            -->
    </menu>

    <menu extra-index="${contentId}" name="childTemplateLine" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml" menu-container-style="+${styles.menu_buttonstyle_alt1}" default-menu-item-name="content" selected-menuitem-context-field-name="currentMenuItemName" title="">
        <menu-item name="edit-inplace" title="${contentName} [${contentId}]">
            <link target="EditChildCompDoc">
                <parameter param-name="contentId"/>
                <parameter param-name="rootContentId"/>
                <parameter param-name="caFromDate" from-field="fromDate"/>
                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="edit-link" title="${uiLabelMap.CommonEdit}">
            <link target="EditChildCompDoc">
                <parameter param-name="contentId"/>
                <parameter param-name="rootContentId"/>
                <parameter param-name="caFromDate" from-field="fromDate"/>
                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <!--  only one level for now, ie don't worry about an hierarchy, still not sure what that will mean or look like
        <menu-item name="child" title="+Child">
            <link target="AddChildCompDocTemplate">
                <parameter param-name="contentIdTo" from-field="contentId"/>
                <parameter param-name="sequenceNum" value="9999"/>
            </link>
        </menu-item>
        -->
        <menu-item name="bef" title="${uiLabelMap.ContentCompDocBefore}">
            <condition>
                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
            </condition>
            <link target="AddChildCompDocTemplate" >
                <parameter param-name="contentId"/>
                <parameter param-name="rootContentId"/>
                <parameter param-name="caContentAssocTypeId" from-field="contentAssocTypeId"/>
                <parameter param-name="caSequenceNum" from-field="seqNumBefore"/>
                <parameter param-name="caFromDate" from-field="fromDate"/>
            </link> <!-- &amp;contentRevisionSeqId=${contentRevisionSeqId} -->
        </menu-item>
        <menu-item name="aft" title="${uiLabelMap.ContentCompDocAfter}">
            <condition>
                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
            </condition>
            <link target="AddChildCompDocTemplate" >
                <parameter param-name="contentId"/>
                <parameter param-name="rootContentId"/>
                <parameter param-name="caContentAssocTypeId" from-field="contentAssocTypeId"/>
                <parameter param-name="caSequenceNum" from-field="seqNumAfter"/>
                <parameter param-name="caFromDate" from-field="fromDate"/>
            </link> <!-- &amp;contentRevisionSeqId=${contentRevisionSeqId} -->
        </menu-item>
        <menu-item name="up" title="${uiLabelMap.ContentCompDocUp}">
            <condition>
                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
            </condition>
            <link target="resequenceCompDocPart">
                <parameter param-name="contentId"/>
                <parameter param-name="dir" value="up"/>
                <parameter param-name="contentAssocTypeId" value="COMPDOC_PART"/>
                <parameter param-name="contentIdTo"/>
                <parameter param-name="caContentAssocTypeId" from-field="contentAssocTypeId"/>
                <parameter param-name="caSequenceNum" from-field="seqNumBefore"/>
                <parameter param-name="caFromDate" from-field="fromDate"/>
                <parameter param-name="rootContentId"/>
                <parameter param-name="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="down" title="${uiLabelMap.ContentCompDocDown}">
            <condition>
                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
            </condition>
            <link target="resequenceCompDocPart">
                <parameter param-name="contentId"/>
                <parameter param-name="dir" value="down"/>
                <parameter param-name="contentAssocTypeId" value="COMPDOC_PART"/>
                <parameter param-name="contentIdTo"/>
                <parameter param-name="caContentAssocTypeId" from-field="contentAssocTypeId"/>
                <parameter param-name="caSequenceNum" from-field="seqNumBefore"/>
                <parameter param-name="caFromDate" from-field="fromDate"/>
                <parameter param-name="rootContentId"/>
                <parameter param-name="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
    </menu>

    <menu name="rootInstanceLine" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml" menu-container-style="+${styles.menu_buttonstyle_alt1}" default-menu-item-name="content" selected-menuitem-context-field-name="currentMenuItemName" title="">
        <menu-item name="edit-inplace" title="${instanceContent.contentName}[${instanceContent.contentId}]"  widget-style="+h2">
            <link target="EditRootCompDoc">
                <parameter param-name="rootContentId"/>
                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="edit" title="${uiLabelMap.CommonEdit}">
            <link target="EditRootCompDoc">
                <parameter param-name="rootContentId"/>
                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
            </link>
        </menu-item>
        <menu-item name="viewtree" title="${uiLabelMap.PageTitleViewCompDocTemplateTree}">
            <link target="ViewCompDocTemplateTree">
                <parameter param-name="rootContentRevisionSeqId" from-field="templateContentRevisionSeqId"/>
                <parameter param-name="rootContentId" from-field="templateContentId"/>
            </link>
        </menu-item>
        <menu-item name="latest" title="${uiLabelMap.ContentCompDocCurrentInstance}">
            <condition>
                <if-compare-field field="mostRecentRevisionSeqId" operator="greater" to-field="rootContentRevisionSeqId"/>
            </condition>
            <link target="ViewCompDocInstanceTree">
                <parameter param-name="rootContentId"/>
            </link> <!-- rootContentRevisionSeqId=${rootContentRevisionSeqId}&amp; -->
        </menu-item>
    </menu>
</menus>