ilscipio/scipio-erp

View on GitHub
applications/party/widget/partymgr/PartyMenus.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->

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

    <menu name="PartyAppBar" title="${uiLabelMap.Party}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <menu-item name="find" title="${uiLabelMap.PartyParties}"><link target="findparty"/></menu-item>
        <menu-item name="mycomm" title="${uiLabelMap.PartyMyCommunications}"><link target="MyCommunicationEvents"/></menu-item>
        <menu-item name="comm" title="${uiLabelMap.PartyCommunications}"><link target="FindCommunicationEvents"/></menu-item>
        <menu-item name="visits" title="${uiLabelMap.PartyVisits}"><link target="findVisits"/></menu-item>
        <menu-item name="loggedinusers" title="${uiLabelMap.PartyLoggedInUsers}"><link target="listLoggedInUsers"/></menu-item>
        <!--<menu-item name="classification" title="${uiLabelMap.PartyClassifications}"><link target="showclassgroups"/></menu-item> -->
        <menu-item name="security" title="${uiLabelMap.CommonSecurity}">
            <condition mode="omit">
                <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
            </condition>
            <link target="FindSecurityGroup"/>
        </menu-item>
        <menu-item name="partyinv" title="${uiLabelMap.PartyInvitation}"><link target="partyInvitation"/></menu-item>
        <menu-item name="importexport" title="${uiLabelMap.CommonImportExport}"><link target="ImportExport"/></menu-item>
    </menu>
    <menu name="PartyAppSideBar" title="${uiLabelMap.PartyManager}" extends="CommonAppSideBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
        always-expand-selected-or-ancestor="true">
        <include-elements menu-name="PartyAppBar" recursive="full" />
        <menu-item name="find">
            <sub-menu name="Profile" include="ProfileSideBar">
                <!-- SCIPIO: 3.0.0: For now, let this expand due to possible non-specific sub-menu items
                <condition>
                    <and>
                        <not><if-false field="currentMenuRenderState.activeItem.specific"/></not>
                        <not><if-empty field="party"/></not>
                    </and>
                </condition>-->
            </sub-menu>
        </menu-item>
        <menu-item name="comm">
            <sub-menu name="CommEvent" include="CommEventSideBar"/>
        </menu-item>
        <!--<menu-item name="classification">
            <sub-menu name="PartyClassification" include="PartyClassificationSideBar"/>
        </menu-item>-->
        <menu-item name="security">
            <sub-menu name="SecurityGroup" include="component://common/widget/SecurityMenus.xml#SecurityGroupSideBar"/>
        </menu-item>
        <menu-item name="partyinv">
            <sub-menu name="PartyInvitation" include="PartyInvitationSideBar"/>
        </menu-item>
    </menu>

    <menu name="ProfileTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
        default-menu-item-name="viewprofile">
        <actions>
            <condition-to-field field="specificPartyItems" type="Boolean">
                <and>
                    <not><if-false field="currentMenuRenderState.activeItem.specific"/></not>
                    <not><if-empty field="party"/></not>
                </and>
            </condition-to-field>
        </actions>
        <menu-item-alias name="findparty" for="PARENT-WITHSUB"/>
        <menu-item-alias name="newperson" for="PARENT-NOSUB"/>
        <menu-item-alias name="newpartygroup" for="PARENT-NOSUB"/>
        <menu-item-alias name="newcustomer" for="PARENT-NOSUB"/>
        <menu-item-alias name="newprospect" for="PARENT-NOSUB"/>
        <menu-item-alias name="newemployee" for="PARENT-NOSUB"/>
        <menu-item name="viewprofile" title="${uiLabelMap.PartyProfile}" sort-mode="off">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="viewprofile">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <!-- 
        <menu-item name="preferences" title="${uiLabelMap.CommonPreferences}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="Preferences">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>--> 
        <menu-item name="viewroles" title="${uiLabelMap.PartyRoles}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="viewroles">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="viewidentifications" title="${uiLabelMap.PartyPartyIdentifications}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="viewidentifications">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        
       <!--
        <menu-item name="linkparty" title="${uiLabelMap.PartyLink}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="linkparty">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>-->
         
        <menu-item name="EditPartyRelationships" title="${uiLabelMap.PartyRelationships}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="EditPartyRelationships">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        
        <menu-item name="viewvendor" title="${uiLabelMap.PartyVendor}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="viewvendor">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="EditPartyTaxAuthInfos" title="${uiLabelMap.PartyTaxAuthInfos}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="EditPartyTaxAuthInfos">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="EditPartyRates" title="${uiLabelMap.CommonRates}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="EditPartyRates">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="editShoppingList" title="${uiLabelMap.PartyShoppingLists}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="editShoppingList">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <!-- 
        <menu-item name="ViewSegmentRoles" title="${uiLabelMap.PartySegments}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="ViewSegmentRoles">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="EditPartyClassifications" title="${uiLabelMap.PartyClassifications}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="EditPartyClassifications">
                <parameter param-name="partyId"/>
            </link>
        </menu-item> -->
        <menu-item name="PartyContents" title="${uiLabelMap.PartyContent}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="EditPartyContents">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        
        <!-- 
        <menu-item name="EditPartySkills" title="${uiLabelMap.CommonPartySkills}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="EditPartySkills">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="EditPartyResumes" title="${uiLabelMap.HumanResPartyResume}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="EditPartyResumes">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
         -->
        <!-- 
        <menu-item name="EditEmploymentApps" title="${uiLabelMap.HumanResEmploymentApp}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="EditEmploymentApps">
                <parameter param-name="partyId"/>
                <parameter param-name="referredByPartyId" from-field="partyId"/>
            </link>
        </menu-item> -->
        <menu-item name="FinancialHistory" title="${uiLabelMap.PartyFinancialHistory}">
            <condition mode="omit">
                <and>
                    <if-true field="specificPartyItems"/>
                    <if-service-permission service-name="acctgBasePermissionCheck" main-action="VIEW"/>
                </and>
            </condition>
            <link target="PartyFinancialHistory">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="PartyGeoLocation" title="${uiLabelMap.CommonGeoLocation}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="PartyGeoLocation">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <!-- 
        <menu-item name="productStoreRoles" title="${uiLabelMap.ProductProductStoreRoles}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="ViewProductStoreRoles">
                <parameter param-name="partyId"/>
            </link>
        </menu-item> -->
        <menu-item name="createNew" title="${uiLabelMap.AccountingBillingAccount}">
            <condition mode="omit">
                <if-service-permission service-name="acctgBasePermissionCheck" main-action="VIEW"/>
            </condition>
            <link target="/accounting/control/FindBillingAccount" url-mode="inter-app">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <!-- 
        <menu-item name="finAccounts" title="${uiLabelMap.AccountingFinAccounts}">
            <condition mode="omit">
                <and>
                    <if-true field="specificPartyItems"/>
                    <if-service-permission service-name="acctgBasePermissionCheck" main-action="VIEW"/>
                </and>
            </condition>
            <link target="/accounting/control/FindFinAccount" url-mode="inter-app">
                <parameter param-name="ownerPartyId" from-field="partyId"/>
            </link>
        </menu-item> -->
        <menu-item name="PartyCommEvents" title="${uiLabelMap.PartyCommunications}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="ListPartyCommEvents">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="findRequest" title="${uiLabelMap.PartyPartyRequests}">
            <condition mode="omit">
                <and>
                    <if-true field="specificPartyItems"/>
                    <if-has-permission permission="ORDERMGR" action="_VIEW"/>
                </and>
            </condition>
            <link target="/ordermgr/control/FindRequest" url-mode="inter-app">
                <parameter param-name="lookupFlag" value="Y"/>
                <parameter param-name="fromPartyId" from-field="partyId"/>
                <parameter param-name="externaLoginKey" from-field="externalLoginKey"/>
            </link>
        </menu-item>
        <menu-item name="findQuote" title="${uiLabelMap.OrderOrderQuotes}" >
            <condition mode="omit">
                <and>
                    <if-true field="specificPartyItems"/>
                    <if-has-permission permission="ORDERMGR" action="_VIEW"/>
                </and>
            </condition>
            <link target="/ordermgr/control/FindQuote" url-mode="inter-app">
                <parameter param-name="partyId"/>
                <parameter param-name="externalLoginKey"/>
            </link>
        </menu-item>
        <menu-item name="searchOrder" title="${uiLabelMap.OrderOrders}" >
            <condition mode="omit">
                <and>
                    <if-true field="specificPartyItems"/>
                    <if-has-permission permission="ORDERMGR" action="_VIEW"/>
                </and>
            </condition>
            <link target="/ordermgr/control/searchorders" url-mode="inter-app" link-type="hidden-form">
                <parameter param-name="lookupFlag" value="Y"/>
                <parameter param-name="hideFields" value="Y"/>
                <parameter param-name="partyId"/>
                <parameter param-name="externalLoginKey"/>
                <parameter param-name="viewIndex" value="1"/>
                <parameter param-name="viewSize" value="20"/>
            </link>
        </menu-item>
        <!-- SCIPIO: TODO: REVIEW: ContactList is originally under CommEvent menu in stock but uses find/party decorator,
            so for now... put it under both (but this is primary) -->
        <menu-item name="ContactList" title="${uiLabelMap.PartyContactLists}">
            <condition>
                <if-true field="specificPartyItems"/>
            </condition>
            <link target="ListPartyContactLists">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
    </menu>
    <menu name="ProfileSideBar" extends="CommonSideBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
        default-menu-item-name="viewprofile" menu-container-style="+scipio-nav-actions-menu">
        <include-elements menu-name="ProfileTabBar" recursive="includes-only" />
    </menu>
    
    <menu name="ProfileSubTabBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <menu-item name="updatePerson" title="${uiLabelMap.CommonEdit}" widget-style="+${styles.action_nav} ${styles.action_update}">
            <condition>
                <not>
                    <if-empty field="lookupPerson"/>
                </not>
            </condition>
            <link target="editperson">
                <parameter param-name="partyId" from-field="parameters.partyId"/>
            </link>
        </menu-item>
        
        <menu-item name="updateGroup" title="${uiLabelMap.CommonEdit}">
            <condition>
                <not>
                    <if-empty field="lookupGroup"/>
                </not>
            </condition>
            <link target="editpartygroup">
                <parameter param-name="partyId" from-field="party.partyId"/>
            </link>
        </menu-item>
        
        <menu-item name="createUserLogin" title="${uiLabelMap.CreateUserLogin}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <if-has-permission permission="PARTYMGR" action="_CREATE"/>
            </condition>
            <link target="ProfileCreateNewLogin">
                <parameter param-name="partyId" from-field="parameters.partyId"/>
            </link>
        </menu-item>
        
        <menu-item name="EditUserLoginSecurityGroups" title="${uiLabelMap.SecurityGroups}" widget-style="+${styles.action_nav} ${styles.action_update}">
            <condition mode="omit">
                <if-has-permission permission="PARTYMGR" action="_CREATE"/>
            </condition>
            <link target="EditUserLoginSecurityGroups">
                <parameter param-name="userLoginId" from-field="parameters.partyId"/>
            </link>
        </menu-item>
        
        
        
         <menu-item name="createIdentification" title="${uiLabelMap.CommonNew} ${uiLabelMap.PartyPartyIdentification}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="viewidentifications">
                <parameter param-name="partyId" from-field="parameters.partyId"/>
            </link>
        </menu-item>
        
        <menu-item name="editcontactmech" title="${uiLabelMap.PartyCreateNewContact}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <if-has-permission permission="PARTYMGR" action="_CREATE"/>
            </condition>
            <link target="editcontactmech">
                <parameter param-name="partyId" from-field="parameters.partyId"/>
            </link>
        </menu-item>
        
        <menu-item name="createNewEftAccount" title="${uiLabelMap.AccountingCreateNewEftAccount}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <or>
                    <if-has-permission permission="PAY_INFO" action="_CREATE"/>
                    <if-has-permission permission="ACCOUNTING" action="_CREATE"/>
                </or>
            </condition>
            <link target="editeftaccount">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="createNewGiftCard" title="${uiLabelMap.AccountingCreateNewGiftCard}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <or>
                    <if-has-permission permission="PAY_INFO" action="_CREATE"/>
                    <if-has-permission permission="ACCOUNTING" action="_CREATE"/>
                </or>
            </condition>
            <link target="editgiftcard">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="createNewCreditCard" title="${uiLabelMap.AccountingCreateNewCreditCard}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <or>
                    <if-has-permission permission="PAY_INFO" action="_CREATE"/>
                    <if-has-permission permission="ACCOUNTING" action="_CREATE"/>
                </or>
            </condition>
            <link target="editcreditcard">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
        <menu-item name="newQuote" title="${uiLabelMap.OrderNewQuote}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <if-has-permission permission="ORDERMGR" action="_CREATE"/>
            </condition>
            <link target="/ordermgr/control/EditQuote" url-mode="inter-app">
                <parameter param-name="partyId"/>
                <parameter param-name="externaLoginKey" from-field="externalLoginKey"/>
            </link>
        </menu-item>
        <menu-item name="newOrder" title="${uiLabelMap.OrderNewOrder}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <if-has-permission permission="ORDERMGR" action="_CREATE"/>
            </condition>
            <link target="/ordermgr/control/checkinits" url-mode="inter-app">
                <parameter param-name="partyId"/>
                <parameter param-name="externaLoginKey" from-field="externalLoginKey"/>
            </link>
        </menu-item>
    </menu>
    <menu name="create-new-party" type="simple" menu-container-style="+basic-nav">
        <!-- SCIPIO: added extra params: lastName, firstName, groupName -->
        <menu-item name="create-party-group" title="${uiLabelMap.PartyCreateNewPartyGroup}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="editpartygroup">
                <parameter param-name="create_new" value="Y"/>
                <parameter param-name="groupName" from-field="parameters.groupName"/>
            </link>
        </menu-item>
        <menu-item name="create-person" title="${uiLabelMap.PartyCreateNewPerson}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="editperson">
                <parameter param-name="create_new" value="Y"/>
                <parameter param-name="lastName" from-field="parameters.lastName"/>
                <parameter param-name="firstName" from-field="parameters.firstName"/>
            </link>
        </menu-item>
        <menu-item name="create-customer" title="${uiLabelMap.PartyCreateNewCustomer}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="NewCustomer"/>
        </menu-item>
        <menu-item name="create-prospect" title="${uiLabelMap.PartyCreateNewProspect}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="NewProspect"/>
        </menu-item>
        <menu-item name="create-employee" title="${uiLabelMap.PartyCreateNewEmployee}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="NewEmployee"/>
        </menu-item>
    </menu>
    <menu name="NewPartySubTabBar" extends="CommonSubTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <include-elements menu-name="create-new-party"/>
    </menu>
    <menu name="NewPartyButtonDropdown" extends="CommonButtonDropdownMenu" extends-resource="component://common/widget/CommonMenus.xml"
        title="${uiLabelMap.CommonNew}" title-style="+${styles.action_nav} ${styles.action_add}">
        <include-elements menu-name="create-new-party"/>
    </menu>

    <menu name="PartyInvitationTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <menu-item name="EditPartyInvitation" title="${uiLabelMap.PartyInvitation}">
            <link target="editPartyInvitation">
                <parameter param-name="partyInvitationId"/>
            </link>
        </menu-item>
        <menu-item name="PartyInvitationGroupAssocs" title="${uiLabelMap.PartyInvitationGroupAssoc}">
            <link target="PartyInvitationGroupAssocs">
                <parameter param-name="partyInvitationId"/>
            </link>
        </menu-item>
        <menu-item name="PartyInvitationRoleAssocs" title="${uiLabelMap.PartyInvitationRoleAssoc}">
            <link target="PartyInvitationRoleAssocs">
                <parameter param-name="partyInvitationId"/>
            </link>
        </menu-item>
    </menu>
    <menu name="PartyInvitationSideBar" extends="CommonSideBarMenu" extends-resource="component://common/widget/CommonMenus.xml" menu-container-style="+scipio-nav-actions-menu">
        <include-elements menu-name="PartyInvitationTabBar" recursive="includes-only" />
        <menu-item-alias name="NewPartyInvitation" for="PARENT-NOSUB"/>
    </menu>
    
    <!-- SCIPIO: new (combined links) -->
    <menu name="PartyInvitationSubTabBar" extends="CommonSubTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <menu-item name="editPartyInvitation" title="${uiLabelMap.PartyInvitationNewPartyInvitation}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="editPartyInvitation"/>
        </menu-item>
        <menu-item name="invitationNewOrder" title="${uiLabelMap.PartyInvitationNewOrder}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="/ordermgr/control/orderentry" url-mode="inter-app">
                <parameter param-name="partyId" from-field="partyInvitation.partyIdFrom"/>
            </link>
        </menu-item>
    </menu>

    <menu name="addShipper">
        <menu-item name="new" title="${uiLabelMap.CommonCreateNew}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <if-has-permission permission="PARTYMGR" action="_CREATE"/>
            </condition>
            <link target="editCarrierAccount">
                <parameter param-name="partyId" from-field="party.partyId"/>
            </link>
        </menu-item>
    </menu>
    <menu name="communicationsMenu">
        <menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <if-has-permission permission="PARTYMGR_CME-EMAIL_CREATE"/>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="communicationEventTypeId" value="EMAIL_COMMUNICATION"/>
                <parameter param-name="partyIdFrom" from-field="partyId"/>
                <parameter param-name="my" value="My"/>
                <parameter param-name="statusId" value="COM_PENDING"/>
                <parameter param-name="form" value="new"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
        <menu-item name="newNote" title="${uiLabelMap.PartyNewInternalNote}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="communicationEventTypeId" value="COMMENT_NOTE"/>
                <parameter param-name="partyIdFrom" from-field="partyId"/>
                <parameter param-name="my" value="My"/>
                <parameter param-name="statusId" value="COM_PENDING"/>
                <parameter param-name="form" value="new"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
        <menu-item name="openEvents" title="${uiLabelMap.PartyOpenEvents}">
            <condition>
                <if-compare field="parameters.all" operator="equals" value="true"/>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
                <parameter param-name="all" value="false"/>
            </link>
        </menu-item>
        <menu-item name="allOtherEvents" title="${uiLabelMap.PartyAllEvents}">
            <condition>
                <or>
                    <if-compare field="parameters.all" operator="equals" value="false"/>
                    <if-empty field="parameters.all"/>
                </or>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
                    <parameter param-name="all" value="true"/>
            </link>
        </menu-item>
    </menu>
    <menu name="MyCommSubTabBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml" 
        menu-container-style="+${styles.menu_buttonstyle_alt2}">
        <actions>
            <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy"/>
        </actions>
        <menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <and>
                    <if-has-permission permission="PARTYMGR_CME-EMAIL_CREATE"/>
                    <if-empty field="communicationEvent"/>
                </and>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="communicationEventTypeId" value="EMAIL_COMMUNICATION"/>
                <parameter param-name="partyIdFrom" from-field="parameters.userLogin.partyId"/>
                <parameter param-name="my" value="My"/>
                <parameter param-name="statusId" value="COM_PENDING"/>
                <parameter param-name="form" value="new"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
        <menu-item name="newInternalNote" title="${uiLabelMap.PartyNewInternalNote}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition mode="omit">
                <and>
                    <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/>
                    <if-empty field="communicationEvent"/>
                </and>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="communicationEventTypeId" value="COMMENT_NOTE"/>
                <parameter param-name="partyIdFrom" from-field="parameters.userLogin.partyId"/>
                <parameter param-name="my" value="My"/>
                <parameter param-name="statusId" value="COM_PENDING"/>
                <parameter param-name="form" value="new"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
        <menu-item name="reply" title="${uiLabelMap.PartyReply}">
            <condition mode="omit">
                <and>
                    <not><if-empty field="communicationEvent"/></not>
                    <not><if-empty field="communicationEvent.partyIdFrom"/></not>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_UNKNOWN_PARTY"/>
                    <if-compare field="communicationEvent.partyIdFrom" operator="not-equals" value="${partyId}"/>
                    <if-has-permission permission="PARTYMGR_CME-EMAIL_UPDATE"/>
                    <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/>
                </and>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="parentCommEventId" from-field="communicationEvent.communicationEventId"/>
                <parameter param-name="my" value="My"/>
                <parameter param-name="statusId" value="COM_PENDING"/>
                <parameter param-name="partyIdFrom" from-field="parameters.partyId"/>
                <parameter param-name="action" value="REPLY"/>
                <parameter param-name="form" value="new"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
        <menu-item name="replyAll" title="${uiLabelMap.PartyReplyAll}">
            <condition mode="omit">
                <and>
                    <not><if-empty field="communicationEvent"/></not>
                    <not><if-empty field="communicationEvent.partyIdFrom"/></not>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_UNKNOWN_PARTY"/>
                    <if-compare field="communicationEvent.partyIdFrom" operator="not-equals" value="${partyId}"/>
                    <if-has-permission permission="PARTYMGR_CME-EMAIL_UPDATE"/>
                    <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/>
                </and>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="parentCommEventId" from-field="communicationEvent.communicationEventId"/>
                <parameter param-name="my" value="My"/>
                <parameter param-name="statusId" value="COM_PENDING"/>
                <parameter param-name="partyIdFrom" from-field="parameters.partyId"/>
                <parameter param-name="action" value="REPLYALL"/>
                <parameter param-name="form" value="new"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
        <menu-item name="forward" title="${uiLabelMap.PartyForward}">
            <condition mode="omit">
                <and>
                    <not><if-empty field="communicationEvent"/></not>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/>
                    <if-has-permission permission="PARTYMGR_CME-EMAIL_UPDATE"/>
                    <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/>
                </and>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="communicationEventTypeId" from-field="communicationEvent.communicationEventTypeId"/>
                <parameter param-name="origCommEventId" from-field="parameters.communicationEventId"/>
                <parameter param-name="partyIdFrom" from-field="parameters.partyId"/>
                <parameter param-name="my" value="My"/>
                <parameter param-name="statusId" value="COM_PENDING"/>
                <parameter param-name="action" value="FORWARD"/>
                <parameter param-name="form" value="new"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
        <menu-item name="createRequestFromCommEvent" title="${uiLabelMap.PartyCreateRequestFromCommEvent}">
            <condition mode="omit">
                <and>
                    <not><if-empty field="communicationEvent"/></not>
                    <not><if-empty field="communicationEvent.partyIdFrom"/></not>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/>
                    <if-has-permission permission="ORDERMGR_CRQ_CREATE"/>
                    <if-compare field="projectMgrExists" operator="equals" value="false"/> 
                    <if-compare field="communicationEvent.statusId" operator="equals" value="COM_ENTERED"/>
                </and>
            </condition>
            <link target="editRequestFromCommEvent">
                <parameter param-name="communicationEventId" from-field="communicationEvent.communicationEventId"/>
                <parameter param-name="my" from-field="parameters.my"/>
            </link>
        </menu-item>
        <menu-item name="createRequestFromCommEvent1" title="${uiLabelMap.PartyCreateRequestFromCommEvent}">
            <condition mode="omit">
                <and>
                    <not><if-empty field="communicationEvent"/></not>
                    <not><if-empty field="communicationEvent.partyIdFrom"/></not>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/>
                    <if-has-permission permission="ORDERMGR_CRQ_CREATE"/>
                    <if-compare field="projectMgrExists" operator="equals" value="true"/> 
                    <if-compare field="communicationEvent.statusId" operator="equals" value="COM_ENTERED"/>
                </and>
            </condition>
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="communicationEventId" from-field="communicationEvent.communicationEventId"/>
                <parameter param-name="my" from-field="parameters.my"/>
                <parameter param-name="form" value="request"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
        <menu-item name="createSalesOpportunity" title="${uiLabelMap.PartyCommEventCreateOpportunity}">
            <condition>
                <and>
                    <not><if-empty field="communicationEvent"/></not>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/>
                    <if-compare field="communicationEvent.statusId" operator="equals" value="COM_ENTERED"/>
                </and>
            </condition>
            <link target="/crm/control/EditSalesOpportunity" url-mode="inter-app">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="close" title="${uiLabelMap.CommonClose}">
            <condition mode="omit">
                <and>
                    <not><if-empty field="communicationEvent"/></not>
                    <if-compare field="communicationEventRole.statusId" operator="equals" value="COM_ROLE_READ"/>
                    <if-has-permission permission="PARTYMGR_CME-EMAIL_UPDATE"/>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_UNKNOWN_PARTY"/>
                </and>
            </condition>
            <link target="setCommunicationEventRoleStatus">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
                <parameter param-name="partyId" from-field="parameters.partyId"/>
                <parameter param-name="roleTypeId" from-field="parameters.roleTypeId"/>
                <parameter param-name="statusId" value="COM_ROLE_COMPLETED"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
        <menu-item name="delete" title="${uiLabelMap.CommonDelete}">
            <condition mode="omit">
                <and>
                    <not><if-empty field="communicationEvent"/></not>
                    <or>
                        <if-has-permission permission="PARTYMGR_CME-EMAIL_DELETE"/>
                        <if-has-permission permission="PARTYMGR_ADMIN"/>
                    </or>
                </and>
            </condition>
            <link target="deleteCommunicationEvent">
                <parameter param-name="communicationEventId" from-field="communicationEvent.communicationEventId"/>
                <parameter param-name="form" value="list"/>
                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
            </link>
        </menu-item>
    </menu>
    
    <menu name="CommEventTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <actions>
            <!-- SCIPIO: this lookup needed so the menu is consistent on all screens -->
            <!-- FIXME?: no perm checks on this lookup, but not important like those in the target screens/decorator -->
            <!-- NOTE: CommEventTabBar_ prefix is so this works with or without share-scope (TODO: find more standard pattern) -->
            <script><![CDATA[groovy:
                communicationEvent = context.communicationEvent;
                if (communicationEvent == null && parameters.communicationEventId) {
                    communicationEvent = delegator.findOne('CommunicationEvent', [communicationEventId: parameters.communicationEventId], false);
                } 
                context.CommEventTabBar_communicationEvent = communicationEvent;
            ]]></script>
        </actions>
        <!-- SCIPIO: redundant
        <menu-item name="Find" title="${uiLabelMap.CommonFind}">
            <link target="FindCommunicationEvents"/>
        </menu-item>-->
        <menu-item name="OverView" title="${uiLabelMap.CommonOverview}">
            <condition><not><if-empty field="CommEventTabBar_communicationEvent"/></not></condition>
            <link target="ViewCommunicationEvent">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="CommunicationEvent" title="${uiLabelMap.PartyCommEvent}">
            <condition><not><if-empty field="CommEventTabBar_communicationEvent"/></not></condition>
            <link target="EditCommunicationEvent">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="UpdateCommPurposes" title="${uiLabelMap.PartyEventPurpose}">
            <condition><not><if-empty field="CommEventTabBar_communicationEvent"/></not></condition>
            <link target="UpdateCommPurposes">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="UpdateCommRoles" title="${uiLabelMap.PartyRoles}">
            <condition><not><if-empty field="CommEventTabBar_communicationEvent"/></not></condition>
            <link target="UpdateCommRoles">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="UpdateCommWorkEfforts" title="${uiLabelMap.PartyCommWorkEfforts}">
            <condition><not><if-empty field="CommEventTabBar_communicationEvent"/></not></condition>
            <link target="ListCommWorkEfforts">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="CommContent" title="${uiLabelMap.CommonContent}">
            <condition><not><if-empty field="CommEventTabBar_communicationEvent"/></not></condition>
            <link target="ListCommContent">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <!-- TODO!
            <menu-item name="ListCommCustRequests" title="CustRequests">
                <link target="ListCommCustRequests">
                    <parameter param-name="partyId"/>
                    <parameter param-name="communicationEventId"/>
                </link>
            </menu-item>
        -->
        <menu-item name="ListUnknownPartyComms" title="${uiLabelMap.PartyEmailFromUnknownParties}">
            <!-- SCIPIO: NOTE: pass communicationEventId here only so the other menu items don't disappear -->
            <link target="listUnknownPartyComms">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="FindCommunicationByOrder" title="${uiLabelMap.PartyFindCommunicationsByOrder}">
            <!-- SCIPIO: NOTE: pass communicationEventId here only so the other menu items don't disappear -->
            <link target="FindCommunicationByOrder">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="UpdateCommOrders" title="${uiLabelMap.OrderOrders}">
            <condition><not><if-empty field="CommEventTabBar_communicationEvent"/></not></condition>
            <link target="UpdateCommOrders">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="UpdateCommProducts" title="${uiLabelMap.ProductProducts}">
            <condition><not><if-empty field="CommEventTabBar_communicationEvent"/></not></condition>
            <link target="UpdateCommProducts">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="ContactList" title="${uiLabelMap.PartyContactLists}">
            <condition>
                <not><if-empty field="partyId"/></not>
            </condition>
            <link target="ListPartyContactLists">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
    </menu>
    <menu name="CommEventSideBar" extends="CommonSideBarMenu" extends-resource="component://common/widget/CommonMenus.xml" menu-container-style="+scipio-nav-actions-menu">
        <include-elements menu-name="CommEventTabBar" recursive="includes-only" />
    </menu>
    
    <menu name="CommFindTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
        default-menu-item-name="find">
        <menu-item name="find" title="${uiLabelMap.CommonFind}" widget-style="+${styles.action_nav} ${styles.action_find}">
            <link target="findCommunications" url-mode="intra-app">
                <parameter param-name="partyId"/>
                <parameter param-name="communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="showall" title="${uiLabelMap.CommonShowAll}" widget-style="+${styles.action_run_sys} ${styles.action_find}">
            <link target="listCommunications" url-mode="intra-app">
                <parameter param-name="partyId"/>
                <parameter param-name="communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="pending" title="${uiLabelMap.PartyPending}">
            <link target="pendingCommunications" url-mode="intra-app">
                <parameter param-name="partyId"/>
                <parameter param-name="communicationEventId"/>
            </link>
        </menu-item>
    </menu>

    <menu name="CommSubTabBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <menu-item name="new" title="${uiLabelMap.PartyNewCommunication}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="EditCommunicationEvent"/>
        </menu-item>
        <menu-item name="edit" title="${uiLabelMap.CommonEdit}" widget-style="+${styles.action_nav} ${styles.action_update}">
            <link target="EditCommunicationEvent">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="reply" title="${uiLabelMap.PartyReply}">
            <condition>
                <and>
                    <not><if-empty field="parameters.communicationEventId"/></not>
                    <not><if-empty field="communicationEvent.partyIdFrom"/></not>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_UNKNOWN_PARTY"/>
                </and>
            </condition>
            <link target="EditCommunicationEvent">
                <parameter param-name="parentCommEventId" from-field="parameters.communicationEventId"/>
                <parameter param-name="partyIdFrom" from-field="parameters.partyId"/>
                <parameter param-name="action" value="REPLY"/>
            </link>
        </menu-item>
        <menu-item name="forward" title="${uiLabelMap.PartyForward}">
            <condition>
                <and>
                    <not><if-empty field="parameters.communicationEventId"/></not>
                    <not><if-empty field="communicationEvent.partyIdFrom"/></not>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_UNKNOWN_PARTY"/>
                </and>
            </condition>
            <link target="EditCommunicationEvent">
                <parameter param-name="origCommEventId" from-field="parameters.communicationEventId"/>
                <parameter param-name="action" value="FORWARD"/>
            </link>
        </menu-item>
        <menu-item name="createRequestFromCommEvent" title="${uiLabelMap.PartyCreateRequestFromCommEvent}">
            <condition>
                <and>
                    <not><if-empty field="parameters.communicationEventId"/></not>
                    <not><if-empty field="communicationEvent.partyIdFrom"/></not>
                    <if-has-permission permission="ORDERMGR_CRQ_CREATE"/>
                    <if-compare field="communicationEvent.statusId" operator="equals" value="COM_ENTERED"/>
                </and>
            </condition>
            <link target="editRequestFromCommEvent">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="createSalesOpportunity" title="${uiLabelMap.PartyCommEventCreateOpportunity}">
            <condition>
                <and>
                    <not><if-empty field="communicationEvent"/></not>
                    <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/>
                    <if-compare field="communicationEvent.statusId" operator="equals" value="COM_ENTERED"/>
                </and>
            </condition>
            <link target="/crm/control/EditSalesOpportunity" url-mode="inter-app">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
            </link>
        </menu-item>
        <menu-item name="delete" title="${uiLabelMap.CommonDelete}">
            <condition mode="omit">
                <and>
                    <not><if-empty field="communicationEventRole"/></not>
                    <or>
                        <if-has-permission permission="PARTYMGR_CME-EMAIL_DELETE"/>
                        <if-has-permission permission="PARTYMGR_ADMIN"/>
                    </or>
                </and>
            </condition>
            <link target="RemoveCommunicationEventRole">
                <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/>
                <parameter param-name="roleTypeId" from-field="communicationEventRole.roleTypeId"/>
                <parameter param-name="deleteCommEventIfLast" value="Y"/>
                <parameter param-name="delContentDataResource" value="Y"/>
            </link>
        </menu-item>
    </menu>

    <menu name="RelContactAccountsSubTabBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
        menu-container-style="+${styles.menu_buttonstyle_alt2}">
        <menu-item name="add" title="${uiLabelMap.CommonNew}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="${parameters._LAST_VIEW_NAME_}">
                <parameter param-name="partyId"/>
                <parameter param-name="portalPageId"/>
                <parameter param-name="editPartyRel" value="Y"/>
            </link>
        </menu-item>
    </menu>

    <menu name="PartyClassificationTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <menu-item name="EditPartyClassificationGroup" title="${uiLabelMap.PartyClassificationGroups}">
            <link target="EditPartyClassificationGroup">
                <parameter param-name="partyClassificationGroupId"/>
            </link>
        </menu-item>
        <menu-item name="EditPartyClassificationGroupParties" title="${uiLabelMap.PartyParties}">
            <link target="EditPartyClassificationGroupParties">
                <parameter param-name="partyClassificationGroupId"/>
            </link>
        </menu-item>
    </menu>
    
    <menu name="PartyClassificationSideBar" extends="CommonSideBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <include-elements menu-name="PartyClassificationTabBar" recursive="includes-only" />
    </menu>
    
    <!-- SCIPIO: 2018: new -->
    <menu name="PartyContentAddEditSubTabBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <menu-item name="NewPartyContent" title="${uiLabelMap.CommonNew}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <condition><not><if-empty field="content"/></not></condition>
            <link target="EditPartyContents">
                <parameter param-name="partyId"/>
            </link>
        </menu-item>
    </menu>

    <!-- SCIPIO: 2019: new -->
    <menu name="SalesOpportunitiesSubTabBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
          menu-container-style="+${styles.menu_buttonstyle_alt2}">
        <menu-item name="add" title="${uiLabelMap.CommonNew}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="EditSalesOpportunity">
                <parameter param-name="leadPartyId" from-field="partyId"/>
            </link>
        </menu-item>
    </menu>

    <menu name="CommunicationSubTabBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
          menu-container-style="+${styles.menu_buttonstyle_alt2}">
        <menu-item name="new" title="${uiLabelMap.PartyNewCommunication}" widget-style="+${styles.action_nav} ${styles.action_add}">
            <link target="EditCommunicationEvent">
                <parameter param-name="partyIdTo" from-field="partyId"/>
            </link>
        </menu-item>
    </menu>


</menus>