Files
ofbiz-framework/applications/marketing/widget/sfa/CommonScreens.xml
T
Nicolas Malin 7165768251 Implemented: Add a framework method to get main webapp menu with the webapp name
(OFBIZ-10601)

To improve theme management and provide better tools for new themes, we implement a method to obtain the main menu of a webapp.
Instead of just managing a menu, we extend the functionality by offering a method to expose a summary of the webapp, to simplify the navigation.

For this we add a new attribute on webapp definition app-shortcut-screen :

    <webapp name="mywebapp"
            ...
            app-shortcut-screen="component://mycomponent/widget/CommonScreens.xml#ShortcutApp"
            ...
    />

The idea is to define a new purpose screen *Shortcut* that contains what defines a webapp when an action or navigation has been requested. With this screen you can load a menu, a search, a complex description and use all screen powerfulness to resolve what displaying and support by theming

    <screen name="ShortcutApp">
        <section>
            <actions>
                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
            </actions>
            <widgets>
                <decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
                    <decorator-section name="body">
                        <include-menu name="MyShortcutAppBar" location="component://mycomponent/widget/CommonMenus.xml"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

Each component are self-sufficient to define what shortcuts to display without framework change or knowledge about other component.
Each theme can implement and customize the display rendering at will.

To illustrate an example of implementation we set sub menu for each webapp defined on applications and exploit it on bluelight theme.

Thanks for Dennis Balkir, Jacques Leroux, Leila Mekika and Julien Nicolas for their involvement
2021-01-15 08:56:23 +01:00

840 lines
51 KiB
XML

<?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.
-->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="main-decorator">
<section>
<actions>
<!-- base/top/specific map first, then more common map added for shared labels -->
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="MarketingUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="SecurityUiLabels" map-name="uiLabelMap" global="true"/>
<set field="layoutSettings.javaScripts[]" value="/partymgr/static/partymgr.js" global="true"/>
<set field="layoutSettings.styleSheets[]" value="/partymgr/static/partymgr.css" global="true"/>
<set field="layoutSettings.companyName" from-field="uiLabelMap.SfaCompanyName" global="true"/>
<set field="layoutSettings.companySubtitle" from-field="uiLabelMap.MarketingCompanySubtitle" global="true"/>
<set field="applicationMenuName" value="SfaAppBar" global="true"/>
<set field="applicationMenuLocation" value="component://marketing/widget/sfa/SfaMenus.xml" global="true"/>
<set field="helpAnchor" from-field="helpAnchor" default-value="_sfa"/>
<set field="applicationTitle" from-field="uiLabelMap.SfaManagerApplication" global="true"/>
<set field="parameters.parentPortalPageId" from-field="parameters.parentPortalPageId" default-value="SFA" global="true"/>
<script location="component://common/groovyScripts/GetParentPortalPageId.groovy"/>
</actions>
<widgets>
<include-screen name="ApplicationDecorator" location="component://commonext/widget/CommonScreens.xml"/>
</widgets>
</section>
</screen>
<screen name="main">
<section>
<actions>
<set field="headerItem" from-field="parameters.headerItem" default-value="main"/>
<set field="helpAnchor" value="_main_screen"/>
<set field="removeAccountDescription" value="${groovy:session.removeAttribute(&quot;accountDescription&quot;)}"/>
<set field="removeContactDescription" value="${groovy:session.removeAttribute(&quot;contactDescription&quot;)}"/>
<set field="removeLeadDescription" value="${groovy:session.removeAttribute(&quot;leadDescription&quot;)}"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="left-column">
<include-screen name="leftbar"/>
</decorator-section>
<decorator-section name="body">
<include-portal-page id="${parameters.portalPageId}"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ShortcutApp">
<section>
<actions>
<property-map resource="MarketingUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="body">
<include-menu name="SfaShortcutAppBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="leftbar">
<section>
<condition><not><if-empty field="userLogin"/></not></condition>
<widgets>
<screenlet id ="SfaQuickAddContactPanel" title="${uiLabelMap.SfaQuickAddContact}" collapsible="true">
<include-form name="QuickAddContact" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
</screenlet>
<screenlet id= "SfaQuickAddLeadPanel" title="${uiLabelMap.SfaQuickAddLead}" collapsible="true">
<include-form name="QuickAddLead" location="component://marketing/widget/sfa/forms/LeadForms.xml"/>
</screenlet>
</widgets>
</section>
</screen>
<screen name="CommonOpportunityDecorator">
<section>
<actions>
<!-- Do action here -->
<set field="salesOpportunityId" from-field="parameters.salesOpportunityId"/>
<set field="headerItem" value="Opportunities"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="OpportunityTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar"/>
</decorator-section>
<decorator-section name="body">
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonPartyDecorator">
<section>
<actions>
<set field="partyId" from-field="parameters.partyId"/>
<set field="partyTypeId" from-field="parameters.partyTypeId"/>
<entity-one entity-name="Party" value-field="party"/>
<entity-one entity-name="Person" value-field="lookupPerson"/>
<entity-one entity-name="PartyGroup" value-field="lookupGroup"/>
<set field="accountDescription" value="${groovy:session.getAttribute(&quot;accountDescription&quot;)}"/>
<set field="contactDescription" value="${groovy:session.getAttribute(&quot;contactDescription&quot;)}"/>
<set field="leadDescription" value="${groovy:session.getAttribute(&quot;leadDescription&quot;)}"/>
</actions>
<widgets>
<section>
<condition>
<or>
<not><if-empty field="leadDescription"/></not>
<not><if-empty field="accountLeadDescription"/></not>
</or>
</condition>
<actions>
<set field="headerItem" value="Leads"/>
<set field="currentCommonDecorator" value="CommonLeadDecorator"/>
</actions>
<widgets/>
</section>
<section>
<condition>
<not><if-empty field="contactDescription"/></not>
</condition>
<actions>
<set field="headerItem" value="Contacts"/>
<set field="currentCommonDecorator" value="CommonContactDecorator"/>
</actions>
<widgets/>
</section>
<section>
<condition>
<not><if-empty field="accountDescription"/></not>
</condition>
<actions>
<set field="headerItem" value="Accounts"/>
<set field="currentCommonDecorator" value="CommonAccountDecorator"/>
</actions>
<widgets/>
</section>
<section>
<condition>
<if-empty field="currentCommonDecorator"/>
</condition>
<actions>
<set field="currentCommonDecorator" value="main-decorator"/>
</actions>
<widgets/>
</section>
<decorator-screen name="${currentCommonDecorator}" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<!-- do check for PARTYMGR, _VIEW permission -->
<condition>
<if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
<section>
<condition>
<and>
<not><if-empty field="party"/></not>
<or>
<not><if-empty field="lookupPerson"/></not>
<not><if-empty field="lookupGroup"/></not>
</or>
</and>
</condition>
<widgets>
<label style="h1" text="${uiLabelMap.PartyTheProfileOf} ${lookupPerson.personalTitle} ${lookupPerson.firstName} ${lookupPerson.middleName} ${lookupPerson.lastName} ${lookupPerson.suffix} ${lookupGroup.groupName} [${partyId}]"/>
</widgets>
</section>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ViewProfile">
<section>
<actions>
<set field="titleProperty" value="PageTitleViewPartyProfile"/>
<set field="tabButtonItem" value="profile"/>
<set field="labelTitleProperty" value="PartyTaxAuthInfos"/>
<set field="layoutSettings.javaScripts[]" value="/partymgr/static/PartyProfileContent.js" global="true"/>
<script location="component://party/groovyScripts/party/ViewProfile.groovy"/>
<script location="component://party/groovyScripts/party/SetRoleVars.groovy"/>
<set field="parameters.partyId" from-field="partyId"/>
<set field="parameters.partyGroupId" from-field="partyGroupId"/>
</actions>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
<not><if-empty field="party"/></not>
</condition>
<widgets>
<section>
<condition>
<if-compare field="showOld" operator="equals" value="true" type="Boolean"/>
</condition>
<widgets>
<container style="button-bar button-style-2">
<link target="viewprofile" text="${uiLabelMap.PartyHideOld}">
<parameter param-name="partyId" from-field="party.partyId"/>
<parameter param-name="roleTypeId" from-field="parameters.roleTypeId"/>
</link>
</container>
</widgets>
<fail-widgets>
<container style="button-bar button-style-2">
<link target="viewprofile" text="${uiLabelMap.PartyShowOld}">
<parameter param-name="partyId" from-field="party.partyId"/>
<parameter param-name="roleTypeId" from-field="parameters.roleTypeId"/>
<parameter param-name="SHOW_OLD" value="true"/>
</link>
</container>
</fail-widgets>
</section>
<section>
<condition>
<not><if-empty field="accountDescription"/></not>
</condition>
<widgets>
<container style="profile-left">
<include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="partyRelContacts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</container>
<container style="profile-right">
<include-screen name="FinAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Attributes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="PaymentMethods" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="LeadPartyDataSource" location="component://marketing/widget/sfa/LeadScreens.xml"/>
</container>
<container style="profile-bottom">
<include-screen name="PartySalesOpportunities" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</container>
</widgets>
</section>
<section>
<condition>
<and>
<or>
<not><if-empty field="leadDescription"/></not>
<not><if-empty field="accountLeadDescription"/></not>
</or>
</and>
</condition>
<widgets>
<container style="profile-left">
<section>
<actions>
<set field="parameters.partyId" from-field="partyId"/>
</actions>
<widgets>
<include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</widgets>
</section>
<section>
<condition>
<not><if-empty field="partyGroupId"/></not>
</condition>
<actions>
<set field="parameters.partyId" from-field="partyGroupId"/>
</actions>
<widgets>
<include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="partyRelContacts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</widgets>
</section>
<section>
<actions>
<set field="parameters.partyId" from-field="partyId"/>
</actions>
<widgets>
<include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="LeadPartyDataSource" location="component://marketing/widget/sfa/LeadScreens.xml"/>
</widgets>
</section>
</container>
<container style="profile-right">
<section>
<actions>
<set field="parameters.partyId" from-field="partyId"/>
</actions>
<widgets>
<include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="PartySalesOpportunities" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</widgets>
</section>
</container>
</widgets>
</section>
<section>
<condition>
<not><if-empty field="contactDescription"/></not>
</condition>
<widgets>
<container style="profile-left">
<include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="partyRelAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</container>
<container style="profile-right">
<include-screen name="UserLogin" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Attributes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Visits" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Subscriptions" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</container>
</widgets>
</section>
</widgets>
<fail-widgets>
<container>
<label style="h3">${uiLabelMap.PartyNoPartyFoundWithPartyId}: ${parameters.partyId}</label>
</container>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ViewLeadProfile">
<section>
<actions>
<set field="titleProperty" value="PageTitleViewPartyProfile"/>
<set field="tabButtonItem" value="profile"/>
<set field="labelTitleProperty" value="PartyTaxAuthInfos"/>
<set field="parameters.roleTypeId" value="LEAD"/>
<set field="layoutSettings.javaScripts[]" value="/partymgr/static/PartyProfileContent.js" global="true"/>
<script location="component://party/groovyScripts/party/ViewProfile.groovy"/>
<script location="component://party/groovyScripts/party/SetRoleVars.groovy"/>
<set field="parameters.partyId" from-field="partyId"/>
<set field="parameters.partyGroupId" from-field="partyGroupId"/>
<set field="DONE_PAGE" value="ViewLeadProfile"/>
</actions>
<widgets>
<include-screen name="LeadProfile"/>
</widgets>
</section>
</screen>
<screen name="ViewContactProfile">
<section>
<actions>
<set field="titleProperty" value="PageTitleViewPartyProfile"/>
<set field="tabButtonItem" value="profile"/>
<set field="labelTitleProperty" value="PartyTaxAuthInfos"/>
<set field="parameters.roleTypeId" value="CONTACT"/>
<set field="layoutSettings.javaScripts[]" value="/partymgr/static/PartyProfileContent.js" global="true"/>
<script location="component://party/groovyScripts/party/ViewProfile.groovy"/>
<script location="component://party/groovyScripts/party/SetRoleVars.groovy"/>
<set field="parameters.partyId" from-field="partyId"/>
<set field="parameters.partyGroupId" from-field="partyGroupId"/>
<set field="DONE_PAGE" value="ViewContactProfile"/>
</actions>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
<not><if-empty field="party"/></not>
</condition>
<widgets>
<section>
<condition>
<if-compare field="showOld" operator="equals" value="true" type="Boolean"/>
</condition>
<widgets>
<container style="button-bar button-style-2">
<link target="ViewContactProfile" text="${uiLabelMap.PartyHideOld}">
<parameter param-name="partyId" from-field="party.partyId"/>
</link>
</container>
</widgets>
<fail-widgets>
<container style="button-bar button-style-2">
<link target="ViewContactProfile" text="${uiLabelMap.PartyShowOld}">
<parameter param-name="partyId" from-field="party.partyId"/>
<parameter param-name="SHOW_OLD" value="true"/>
</link>
</container>
</fail-widgets>
</section>
<section>
<condition>
<not><if-empty field="contactDescription"/></not>
</condition>
<widgets>
<container style="profile-left">
<include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="partyRelAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</container>
<container style="profile-right">
<section>
<actions>
<set field="parameters.partyId" from-field="partyId"/>
</actions>
</section>
<include-screen name="UserLogin" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Attributes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Visits" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Subscriptions" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</container>
</widgets>
</section>
</widgets>
<fail-widgets>
<container>
<label style="h3">${uiLabelMap.PartyNoPartyFoundWithPartyId}: ${parameters.partyId}</label>
</container>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ViewAccountProfile">
<section>
<actions>
<set field="titleProperty" value="PageTitleViewPartyProfile"/>
<set field="tabButtonItem" value="profile"/>
<set field="labelTitleProperty" value="PartyTaxAuthInfos"/>
<set field="parameters.roleTypeId" value="ACCOUNT"/>
<set field="layoutSettings.javaScripts[]" value="/partymgr/static/PartyProfileContent.js" global="true"/>
<script location="component://party/groovyScripts/party/ViewProfile.groovy"/>
<script location="component://party/groovyScripts/party/SetRoleVars.groovy"/>
<set field="parameters.partyId" from-field="partyId"/>
<set field="parameters.partyGroupId" from-field="partyGroupId"/>
<set field="DONE_PAGE" value="ViewAccountProfile"/>
</actions>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
<not><if-empty field="party"/></not>
</condition>
<widgets>
<section>
<condition>
<if-compare field="showOld" operator="equals" value="true" type="Boolean"/>
</condition>
<widgets>
<container style="button-bar button-style-2">
<link target="ViewAccountProfile" text="${uiLabelMap.PartyHideOld}">
<parameter param-name="partyId" from-field="party.partyId"/>
</link>
</container>
</widgets>
<fail-widgets>
<container style="button-bar button-style-2">
<link target="ViewAccountProfile" text="${uiLabelMap.PartyShowOld}">
<parameter param-name="partyId" from-field="party.partyId"/>
<parameter param-name="SHOW_OLD" value="true"/>
</link>
</container>
</fail-widgets>
</section>
<section>
<condition>
<not><if-empty field="accountDescription"/></not>
</condition>
<widgets>
<container style="profile-left">
<include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="partyRelContacts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</container>
<container style="profile-right">
<include-screen name="FinAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Attributes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="PaymentMethods" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="LeadPartyDataSource" location="component://marketing/widget/sfa/LeadScreens.xml"/>
</container>
<container style="profile-bottom">
<include-screen name="PartySalesOpportunities" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</container>
</widgets>
</section>
</widgets>
<fail-widgets>
<container>
<label style="h3">${uiLabelMap.PartyNoPartyFoundWithPartyId}: ${parameters.partyId}</label>
</container>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ViewAccountLeadProfile">
<section>
<actions>
<set field="titleProperty" value="PageTitleViewPartyProfile"/>
<set field="tabButtonItem" value="profile"/>
<set field="labelTitleProperty" value="PartyTaxAuthInfos"/>
<set field="parameters.roleTypeId" value="ACCOUNT_LEAD"/>
<set field="layoutSettings.javaScripts[]" value="/partymgr/static/PartyProfileContent.js" global="true"/>
<script location="component://party/groovyScripts/party/ViewProfile.groovy"/>
<script location="component://party/groovyScripts/party/SetRoleVars.groovy"/>
<set field="parameters.partyId" from-field="partyId"/>
<set field="parameters.partyGroupId" from-field="partyGroupId"/>
<set field="DONE_PAGE" value="ViewAccountLeadProfile"/>
</actions>
<widgets>
<include-screen name="LeadProfile"/>
</widgets>
</section>
</screen>
<screen name="LeadProfile">
<section>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
<not><if-empty field="party"/></not>
</condition>
<widgets>
<section>
<condition>
<if-compare field="showOld" operator="equals" value="true" type="Boolean"/>
</condition>
<widgets>
<container style="button-bar button-style-2">
<link target="ViewAccountLeadProfile" text="${uiLabelMap.PartyHideOld}">
<parameter param-name="partyId" from-field="party.partyId"/>
</link>
</container>
</widgets>
<fail-widgets>
<container style="button-bar button-style-2">
<link target="ViewAccountLeadProfile" text="${uiLabelMap.PartyShowOld}">
<parameter param-name="partyId" from-field="party.partyId"/>
<parameter param-name="SHOW_OLD" value="true"/>
</link>
</container>
</fail-widgets>
</section>
<section>
<condition>
<and>
<or>
<not><if-empty field="leadDescription"/></not>
<not><if-empty field="accountLeadDescription"/></not>
</or>
</and>
</condition>
<widgets>
<container style="profile-left">
<section>
<actions>
<set field="parameters.partyId" from-field="partyId"/>
</actions>
<widgets>
<include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</widgets>
</section>
<section>
<condition>
<not><if-empty field="partyGroupId"/></not>
</condition>
<actions>
<set field="parameters.partyId" from-field="partyGroupId"/>
</actions>
<widgets>
<include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="partyRelContacts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</widgets>
</section>
<section>
<actions>
<set field="parameters.partyId" from-field="partyId"/>
</actions>
<widgets>
<include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="LeadPartyDataSource" location="component://marketing/widget/sfa/LeadScreens.xml"/>
</widgets>
</section>
</container>
<container style="profile-right">
<section>
<actions>
<set field="parameters.partyId" from-field="partyId"/>
</actions>
<widgets>
<include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
<include-screen name="PartySalesOpportunities" location="component://party/widget/partymgr/ProfileScreens.xml"/>
</widgets>
</section>
</container>
</widgets>
</section>
</widgets>
<fail-widgets>
<container>
<label style="h3">${uiLabelMap.PartyNoPartyFoundWithPartyId}: ${parameters.partyId}</label>
</container>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ViewPartiesCreatedByVCard">
<section>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
<or>
<not><if-empty field="parameters.partiesCreated"/></not>
<not><if-empty field="parameters.partiesExist"/></not>
</or>
</condition>
<actions>
<set field="partiesCreated" from-field="parameters.partiesCreated"/>
<set field="partiesExist" from-field="parameters.partiesExist"/>
</actions>
<widgets>
<screenlet title="${uiLabelMap.MarketingPartiesLoaded}">
<include-grid name="ViewPartiesCreatedByVCard" location="component://marketing/widget/sfa/forms/CommonForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.MarketingPartiesNoLoadedAlreadyExist}">
<include-grid name="ViewPartiesExistInVCard" location="component://marketing/widget/sfa/forms/CommonForms.xml"/>
</screenlet>
</widgets>
<fail-widgets>
<container>
<label style="h3">${uiLabelMap.MarketingNoPartyLoad}</label>
</container>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonCommunicationEventDecorator">
<section>
<actions>
<set field="headerItem" from-field="parameters.headerItem"/>
<entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
</actions>
<widgets>
<section>
<condition>
<if-empty field="parameters.partyId"/>
</condition>
<actions>
<set field="parameters.partyId" from-field="parameters.partyIdFrom"/>
</actions>
<widgets/>
</section>
<section>
<condition>
<not><if-empty field="parameters.partyId"/></not>
</condition>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-menu name="OpportunitySubTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
<screenlet title="${uiLabelMap.PageTitleListCommunications}">
<decorator-section-include name="body"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<include-menu name="OpportunityTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar"/>
</decorator-section>
<decorator-section name="body">
<include-menu name="OpportunitySubTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</fail-widgets>
</section>
</widgets>
</section>
</screen>
<screen name="CommonAccountDecorator">
<section>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<include-menu name="AccountTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar"/>
</decorator-section>
<decorator-section name="body">
<include-menu name="AccountSubTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonContactDecorator">
<section>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<include-menu name="ContactTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar"/>
</decorator-section>
<decorator-section name="body">
<include-menu name="ContactSubTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonLeadDecorator">
<section>
<actions>
<entity-and entity-name="PartyRelationship" list="relatedCompanies" filter-by-date="true">
<field-map field-name="partyIdTo" from-field="partyId"/>
<field-map field-name="roleTypeIdFrom" value="ACCOUNT_LEAD"/>
<field-map field-name="roleTypeIdTo" value="LEAD"/>
<field-map field-name="partyRelationshipTypeId" value="EMPLOYMENT"/>
</entity-and>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<include-menu name="LeadTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<include-menu name="LeadSubTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonEventDecorator">
<section>
<actions>
<set field="headerItem" value="Events"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<include-menu name="EventTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar"/>
</decorator-section>
<decorator-section name="body">
<include-menu name="EventSubTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonWorkEffortDecorator">
<section>
<widgets>
<decorator-screen name="CommonEventDecorator">
<decorator-section name="body">
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>