applications/marketing/widget/sfa/ContactScreens.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="FindContacts">
<section>
<actions>
<property-map resource="MarketingUiLabels" map-name="uiLabelMap" global="true"/>
<set field="currentUrl" value="FindContacts"/>
<set field="activeSubMenuItem" value="Contacts"/>
<script lang="groovy"><![CDATA[
session.setAttribute('contactDescription', context.activeSubMenuItem)
session.removeAttribute('accountDescription')
session.removeAttribute('leadDescription')
]]></script>
<set field="title" value="${uiLabelMap.SfaContacts}"/>
<set field="findScreenShowResults" value="true"/> <!-- Always display results -->
</actions>
<widgets>
<!--<decorator-screen name="CommonSfaAppDecorator" location="${parameters.mainDecoratorLocation}">-->
<decorator-screen name="CommonContactDecorator" location="component://marketing/widget/sfa/CommonScreens.xml">
<decorator-section name="body">
<include-menu name="ContactSubTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
<container>
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<!-- <include-menu name="ContactFindTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/> -->
<include-form name="FindContacts" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<section>
<widgets>
<!-- list all contacts -->
<!-- <label style="heading" text="${uiLabelMap.SfaAllContacts}"/> -->
<include-form name="ListContacts" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</container>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="NewContact">
<section>
<actions>
<set field="titleProperty" value="PageTitleCreateContact"/>
<set field="activeSubMenuItem" value="Contacts"/>
<property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/>
</actions>
<widgets>
<decorator-screen name="CommonContactDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet>
<include-form name="NewContact" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="MergeContacts">
<section>
<actions>
<set field="titleProperty" value="PageTitleCreateContact"/>
<!--<set field="activeSubMenuItem" value="Contacts"/>-->
<set field="activeSubMenu" from-field="activeSubMenu" default-value="component://marketing/widget/sfa/SfaMenus.xml#Contact"/>
<set field="activeSubMenuItem" value="MergeContacts"/>
<script location="component://marketing/webapp/sfa/WEB-INF/action/MergeContacts.groovy"/>
</actions>
<widgets>
<decorator-screen name="CommonContactDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.SfaMergeContacts}">
<include-form name="MergeContacts" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
</screenlet>
<section>
<condition>
<if-compare-field field="parameters.partyIdFrom" operator="not-equals" to-field="parameters.partyIdTo"/>
</condition>
<widgets>
<section>
<condition>
<not><if-empty field="contactInfoList" /></not>
</condition>
<widgets>
<screenlet title="${uiLabelMap.SfaMergeContacts}">
<platform-specific>
<html><html-template location="component://marketing/webapp/sfa/contact/mergeContacts.ftl"/></html>
</platform-specific>
</screenlet>
</widgets>
</section>
</widgets>
<fail-widgets>
<label text="${uiLabelMap.SfaCanNotMergeSameContact}"></label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="NewContactFromVCard">
<section>
<actions>
<set field="titleProperty" value="PageTitleCreateContactFromVCard"/>
<set field="activeSubMenuItem" value="Contacts"/>
</actions>
<widgets>
<decorator-screen name="CommonContactDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<label style="common-msg-warning">${uiLabelMap.CommonWarning}: ${uiLabelMap.CommonUnsupportedFunction}</label>
<screenlet>
<container><label text="${uiLabelMap.SfaAutoCreateContactByImportingVCard}"/></container>
<include-form name="NewContactFromVCard" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<!-- SCIPIO: 2018-09-12: Moved here from original stock location CommonScreens.xml -->
<screen name="ViewPartiesCreatedByVCard">
<section>
<actions>
<set field="titleProperty" value="PageTitleCreateContactFromVCard"/>
<set field="activeSubMenuItem" value="Contacts"/>
<!-- SCIPIO: TODO?: this is a very limited screen, only shows results from import,
cannot list those imported before... -->
</actions>
<widgets>
<decorator-screen name="CommonContactDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<label style="common-msg-warning">${uiLabelMap.CommonWarning}: ${uiLabelMap.CommonUnsupportedFunction}</label>
<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-form name="ViewPartiesCreatedByVCard" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.MarketingPartiesNotLoadedAlreadyExist}">
<include-form name="ViewPartiesExistInVCard" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
</screenlet>
</widgets>
<fail-widgets>
<label style="common-msg-result-norecord" text="${uiLabelMap.MarketingNoPartyLoad}"/>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>