You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/07/13 05:49:49 UTC
svn commit: r676259 - in /ofbiz/trunk/applications/party:
script/org/ofbiz/party/communication/
webapp/partymgr/WEB-INF/actions/communication/
webapp/partymgr/communication/ widget/partymgr/
Author: hansbak
Date: Sat Jul 12 20:49:48 2008
New Revision: 676259
URL: http://svn.apache.org/viewvc?rev=676259&view=rev
Log:
container to screenlet conversion, fixed several errors, still not finished
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy
ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml
ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=676259&r1=676258&r2=676259&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Sat Jul 12 20:49:48 2008
@@ -219,7 +219,6 @@
<simple-method method-name="allocateMsgToParty" short-description="Allocate an emailaddress to an existing/new party, update the communication event accordingly">
<entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/>
-
<if-empty field="communicationEvent">
<add-error><fail-message message="Comminication Event ID: ${parameters.commnicationEventId}"/></add-error>
<check-errors/>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy?rev=676259&r1=676258&r2=676259&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy Sat Jul 12 20:49:48 2008
@@ -23,6 +23,7 @@
communicationEvent = delegator.findOne("CommunicationEvent", [communicationEventId : parameters.communicationEventId], true);
+if (!communicationEvent.note) return;
nameString = "Sent from: ";
int startEmail = communicationEvent.note.indexOf(nameString) + nameString.length();
int endEmail = communicationEvent.note.indexOf(";", startEmail);
Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml?rev=676259&r1=676258&r2=676259&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Sat Jul 12 20:49:48 2008
@@ -33,25 +33,21 @@
<field name="partyId" map-name="parameters"><hidden/></field>
<field name="communicationEventId" use-when="communicationEvent!=null"><display/></field>
- <field name="communicationEventTypeId" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}">
+ <field name="parentCommEventId" position="2">
+ <lookup target-form-name="LookupCommEvent">
+ <sub-hyperlink use-when=""${communicationEvent.parentCommEventId}".length()>0" link-style="buttontext" target="EditCommunicationEvent?communicationEventId=${communicationEvent.parentCommEventId}" description="${uiLabelMap.PartyGoToParent}"/>
+ </lookup>
+ </field>
+ <field name="communicationEventTypeId">
<drop-down>
<entity-options entity-name="CommunicationEventType" description="${description}">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
- <field name="communicationEventTypeId" use-when="${bsh:(communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED"))}">
- <display-entity entity-name="CommunicationEventType" description="${description}" key-field-name="communicationEventTypeId"/>
- </field>
-
- <field name="parentCommEventId">
- <lookup target-form-name="LookupCommEvent">
- <sub-hyperlink use-when=""${communicationEvent.parentCommEventId}".length()>0" link-style="buttontext" target="EditCommunicationEvent?communicationEventId=${communicationEvent.parentCommEventId}" description="${uiLabelMap.PartyGoToParent}"/>
- </lookup>
- </field>
<!-- status -->
- <field name="statusId" use-when="communicationEvent==null" title="${uiLabelMap.CommonStatus}" >
+ <field name="statusId" title="${uiLabelMap.CommonStatus}" position="2">
<drop-down>
<entity-options description="${description}" entity-name="StatusItem" key-field-name="statusId">
<entity-constraint name="statusTypeId" operator="equals" value="COM_EVENT_STATUS"/>
@@ -59,111 +55,56 @@
</entity-options>
</drop-down>
</field>
- <field name="statusId" use-when="communicationEvent!=null" title="${uiLabelMap.CommonStatus}" >
- <drop-down allow-empty="false" current-description="${currentStatus.description}">
- <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})">
- <entity-constraint name="statusId" value="${communicationEvent.statusId}"/>
- <entity-order-by field-name="sequenceId"/>
- </entity-options>
- </drop-down>
- </field>
-
- <!-- auto email fields -->
- <field name="fromString" use-when="${bsh:communicationEvent!=null&&communicationEvent.getString("fromString")!=null}">
- <display/>
- </field>
- <field name="toString" use-when="${bsh:communicationEvent!=null&&communicationEvent.getString("toString")!=null}">
- <display/>
- </field>
- <field name="toString" map-name="parameters" use-when="${bsh:communicationEvent==null&&toString!=null}">
- <text size="60"/>
- </field>
-
<!-- party ID fields -->
- <field name="partyIdFrom" title="${uiLabelMap.PartyPartyFrom}" use-when="communicationEvent==null">
- <lookup target-form-name="LookupPartyName" default-value="${userLogin.partyId}"/>
- </field>
- <field name="partyIdFrom" title="${uiLabelMap.PartyPartyFrom}" use-when="communicationEvent!=null">
+ <field name="partyIdFrom" title="${uiLabelMap.PartyPartyFrom}" position="1">
<lookup target-form-name="LookupPartyName"/>
</field>
- <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}">
+ <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}" position="2">
<lookup target-form-name="LookupPartyName"/>
</field>
- <!-- contact mech type -->
- <field name="contactMechTypeId" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}">
+ <field name="contactMechTypeId">
<drop-down>
- <entity-options description="${description}" entity-name="ContactMechType" key-field-name="contactMechTypeId">
- <entity-order-by field-name="description"/>
- </entity-options>
+ <entity-options description="${description}" entity-name="ContactMechType"/>
</drop-down>
</field>
- <field name="contactMechTypeId" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}">
- <display-entity entity-name="ContactMechType" description="${description}" key-field-name="contactMechTypeId"/>
- </field>
<!-- this is an example of how to display different types of contact mech to the user -->
- <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromEmailAddress}"
- use-when="${bsh:(parameters.get("communicationEventTypeId")!=null)&&(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION")||parameters.get("communicationEventTypeId").equals("AUTO_EMAIL_COMM"))}">
- <drop-down allow-empty="false" current="selected">
- <entity-options entity-name="PartyAndContactMech" description="${infoString}" key-field-name="contactMechId">
- <entity-constraint name="partyId" operator="equals" value="${partyIdFrom}"/>
- </entity-options>
- </drop-down>
- </field>
- <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromContactMech}"
- use-when="${bsh:(parameters.get("communicationEventTypeId")==null)||!(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION")||parameters.get("communicationEventTypeId").equals("AUTO_EMAIL_COMM"))}">
- <lookup target-form-name="LookupPreferredContactMech" target-parameter="partyIdFrom"/></field>
-
- <!-- TODO: somehow show the address or email here, rather than just a contactMechId -->
- <field name="contactMechIdTo" title="${uiLabelMap.PartyToEmailAddress}"
- use-when="${bsh:(parameters.get("communicationEventTypeId")!=null)&&(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION"))}">
- <drop-down allow-empty="false" current="selected" no-current-selected-key="${parameters.contactMechIdTo}">
- <list-options key-name="contactMechId" list-name="targetEmailAddresses" description="${infoString}"/>
- </drop-down>
- </field>
- <field name="contactMechIdTo" title="${uiLabelMap.PartyToContactMech}"
- use-when="${bsh:(parameters.get("communicationEventTypeId")==null)||!(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION"))}">
- <lookup target-form-name="LookupPreferredContactMech" target-parameter="partyIdTo"/></field>
-
- <!-- role type info -->
- <field name="roleTypeIdFrom" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}">
+ <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromContactMech}">
+ <lookup target-form-name="LookupPreferredContactMech" target-parameter="partyIdFrom"/>
+ </field>
+ <field name="contactMechIdTo" title="${uiLabelMap.PartyToContactMech}" position="2">
+ <lookup target-form-name="LookupPreferredContactMech" target-parameter="partyIdFrom"/>
+ </field>
+
+ <field name="roleTypeIdFrom">
<drop-down no-current-selected-key="_NA_">
<entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
- <field name="roleTypeIdFrom" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}">
- <display-entity entity-name="RoleType" description="${description}" key-field-name="roleTypeId"/>
- </field>
- <field name="roleTypeIdTo" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}">
+ <field name="roleTypeIdTo" position="2">
<drop-down no-current-selected-key="_NA_">
<entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
- <field name="roleTypeIdTo" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}">
- <display-entity entity-name="RoleType" description="${description}" key-field-name="roleTypeId"/>
- </field>
<!-- contact list -->
- <field name="contactListId" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}">
+ <field name="contactListId">
<lookup size="20" target-form-name="LookupContactList">
<sub-hyperlink target="/marketing/control/EditContactList?contactListId=${communicationEvent.contactListId}" target-type="inter-app" link-style="smallSubmit"/>
</lookup>
</field>
- <field name="contactListId" use-when="${bsh:communicationEvent!=null&&communicationEvent.getString("contactListId")!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"><display/></field>
-
<field name="datetimeStarted" title="${uiLabelMap.CommonStartDate}"><date-time/></field>
- <field name="datetimeEnded" title="${uiLabelMap.CommonFinishDate}"><date-time/></field>
+ <field name="datetimeEnded" title="${uiLabelMap.CommonFinishDate}" position="2"><date-time/></field>
- <field name="subject" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"><text size="60"/></field>
- <field name="subject" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"><display/></field>
+ <field name="subject"><text size="60"/></field>
- <field name="reasonEnumId">
+ <field name="reasonEnumId" position="2">
<drop-down no-current-selected-key="" allow-empty="true">
<entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId">
<entity-constraint name="enumTypeId" operator="equals" value="CE_COMM_REASON"/>
@@ -171,20 +112,18 @@
</entity-options>
</drop-down>
</field>
- <field name="contentMimeTypeId" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}">
+ <field name="contentMimeTypeId">
<drop-down no-current-selected-key="text/plain" allow-empty="false">
<entity-options description="${mimeTypeId}" entity-name="MimeType" key-field-name="mimeTypeId">
<entity-order-by field-name="mimeTypeId"/>
</entity-options>
</drop-down>
</field>
- <field name="contentMimeTypeId" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"><display/></field>
- <field name="content" title="${uiLabelMap.CommonContent}" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"><textarea cols="60" rows="10"/></field>
- <field name="content" title="${uiLabelMap.CommonContent}" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"><textarea cols="60" rows="10" read-only="true"/></field>
+ <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10"/></field>
<field name="note" title="${uiLabelMap.CommonNote}"><textarea cols="60" rows="3"/></field>
- <field name="messageId" use-when="${bsh:communicationEvent!=null&&communicationEvent.getString("messageId")!=null}"><display/></field>
+ <field name="messageId"><display/></field>
<field name="submitButton" title="${uiLabelMap.CommonSave}"><submit button-type="button"/></field>
</form>
@@ -262,20 +201,10 @@
<field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}"><display-entity entity-name="PartyNameView" key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"><sub-hyperlink target="viewprofile?partyId=${communicationEvent.partyIdTo}" description="[${communicationEvent.partyIdTo}]"/></display-entity></field>
<field name="statusId"><display-entity description="${description}" entity-name="StatusItem" key-field-name="statusId"/></field>
<field name="contactMechTypeId"><display-entity description="${description}" entity-name="ContactMechType" key-field-name="contactMechTypeId"/></field>
- <!-- This will display email addresses when it is an email. This could be more elaborate to show the actual string, or it could
- be done probably with a Java helper method to cut down on repetitive code -->
- <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromEmailAddress}"
- use-when="((communicationEvent.getString("contactMechTypeId")!=null)&&(communicationEvent.getString("contactMechTypeId").equals("EMAIL_ADDRESS")))">
- <display-entity entity-name="ContactMech" key-field-name="contactMechId" description="${infoString}"/>
- </field>
- <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromContactMech}"
- use-when="((communicationEvent.getString("contactMechTypeId")==null)||!(communicationEvent.getString("contactMechTypeId").equals("EMAIL_ADDRESS")))"><display/></field>
- <field name="contactMechIdTo" title="${uiLabelMap.PartyToEmailAddress}"
- use-when="((communicationEvent.getString("contactMechTypeId")!=null)&&(communicationEvent.getString("contactMechTypeId").equals("EMAIL_ADDRESS")))">
+ <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromContactMech}"><display/></field>
+ <field name="contactMechIdTo" title="${uiLabelMap.PartyToEmailAddress}">
<display-entity entity-name="ContactMech" key-field-name="contactMechId" description="${infoString}"/>
</field>
- <field name="contactMechIdTo" title="${uiLabelMap.PartyToContactMech}"
- use-when="((communicationEvent.getString("contactMechTypeId")==null)||!(communicationEvent.getString("contactMechTypeId").equals("EMAIL_ADDRESS")))"><display/></field>
<field name="roleTypeIdFrom"><display-entity description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/></field>
<field name="roleTypeIdTo"><display-entity description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/></field>
<field name="datetimeStarted" title="${uiLabelMap.CommonStartDate}"><display/></field>
@@ -285,35 +214,32 @@
<field map-name="subjectMap" name="eventNote" title="${uiLabelMap.CommonNote}"><display/></field>
<field name="contentMimeTypeId"><display/></field>
<field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10" read-only="true"/></field>
- <field name="content" title="${uiLabelMap.CommonContent}" use-when="(communicationEvent.getString("contentMimeTypeId")!=null)&&(communicationEvent.getString("contentMimeTypeId").indexOf("text/html")) != -1">
- <display also-hidden="false"/> <!-- if not set, it is also hidden, which could cause it to re-dislay -->
- </field>
</form>
<form name="findCommEvents" type="single" target="FindCommunicationEvents" paginate="true"
header-row-style="header-row" default-table-style="basic-table">
- <field name="communicationEventId" use-when="communicationEvent != null"><text-find/></field>
- <field name="parentCommEventId"><text-find/></field>
- <field name="origCommEventId"><text-find/></field>
- <field name="partyIdFrom" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonFrom}"><lookup target-form-name="LookupPartyName"/></field>
- <field name="partyIdTo" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonTo}"><lookup target-form-name="LookupPartyName"/></field>
- <field name="communicationEventTypeId">
+ <field name="communicationEventId" position="1"><text-find/></field>
+ <field name="parentCommEventId" position="2"><text-find/></field>
+ <!-- field name="origCommEventId"><text-find/></field-->
+ <field name="partyIdFrom" position="1" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonFrom}"><lookup target-form-name="LookupPartyName"/></field>
+ <field name="partyIdTo" position="2" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonTo}"><lookup target-form-name="LookupPartyName"/></field>
+ <field name="communicationEventTypeId" position="1">
<drop-down allow-empty="true">
<entity-options description="${description}" entity-name="CommunicationEventType" key-field-name="communicationEventTypeId"/>
</drop-down>
</field>
- <field name="statusId">
+ <field name="statusId" position="2">
<drop-down allow-empty="true">
<entity-options description="${description}" entity-name="StatusItem">
<entity-constraint name="statusTypeId" operator="equals" value="COM_EVENT_STATUS"/>
</entity-options>
</drop-down>
</field>
- <field name="contactMechTypeId">
+ <!-- field name="contactMechTypeId">
<drop-down allow-empty="true">
<entity-options description="${description}" entity-name="ContactMechType" key-field-name="contactMechTypeId"/>
</drop-down>
- </field>
+ </field-->
<!--field name="roleTypeIdFrom">
<drop-down allow-empty="true">
<entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/>
@@ -324,7 +250,7 @@
<entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/>
</drop-down>
</field-->
- <field name="custRequestId"><lookup size="20" target-form-name="LookupCustRequest"/></field>
+ <!-- field name="custRequestId"><lookup size="20" target-form-name="LookupCustRequest"/></field-->
<!--field name="datetimeStarted" title="${uiLabelMap.CommonStartDate}"><date-find/></field>
<field name="datetimeEnded" title="${uiLabelMap.CommonFinishDate}"><date-find/></field>
<field name="reasonEnumId">
@@ -335,7 +261,7 @@
</entity-options>
</drop-down>
</field-->
- <field map-name="subjectMap" name="subject"><text-find/></field>
+ <field map-name="subjectMap" name="subject"><text-find default-option="like"/></field>
<field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
<field name="submitButton" title="${uiLabelMap.CommonFind}"><submit button-type="button"/></field>
@@ -517,7 +443,7 @@
</form>
<form name="listCommContent" type="list" list-name="contentDataResourceList" paginate-target="/ListCommContent"
- view-size="20" header-row-style="header-row-2" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<actions>
<entity-and entity-name="CommEventContentDataResource" list-name="contentDataResourceList">
<field-map field-name="communicationEventId"/>
@@ -555,7 +481,7 @@
<option key="text/plain" description="Plain Text"/>
<option key="image/jpeg" description="JPEG"/>
<option key="image/gif" description="GIF"/>
- <option key="image/tiff" description="TIFF"/>
+ <option key="image iff" description="TIFF"/>
<option key="image/png" description="PNG"/>
<option key="application/octet-stream" description="Other"/>
</drop-down>
@@ -705,10 +631,10 @@
</actions>
<field name="communicationEventId"><hidden value="${parameters.communicationEventId}"/></field>
<field name="partyId" tooltip="leave empty for new 'Party'" position="1"><lookup target-form-name="LookupPartyName"/></field>
- <field name="emailAddress" position="2" use-when="communicationEvent.get("partyIdFrom")==null"><text default-value="${fromEmail}"/></field>
+ <field name="emailAddress" position="2"><text/></field>
<field name="firstName" position="1"><text/></field>
- <field name="middleName" position="2"><text default-value="${toEmail}"/></field>
- <field name="lastName" position="3"><text default-value="${toEmail}"/></field>
+ <field name="middleName" position="2"><text/></field>
+ <field name="lastName" position="3"><text/></field>
<field name="submit" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
Modified: ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml?rev=676259&r1=676258&r2=676259&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml Sat Jul 12 20:49:48 2008
@@ -169,88 +169,18 @@
<section>
<actions>
<set field="headerItem" value="comm"/>
- <set field="communicationEventId" from-field="parameters.communicationEventId"/>
- <entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/>
- <set field="okayToUpdate" value="true" type="Boolean" global="true"/>
</actions>
<widgets>
- <section>
- <condition>
- <and>
- <not><if-empty field-name="communicationEvent.statusId"/></not>
- <or>
- <if-compare field-name="communicationEvent.statusId" operator="equals" type="String" value="COM_COMPLETE"/>
- <if-compare field-name="communicationEvent.statusId" operator="equals" type="String" value="COM_RESOLVED"/>
- <if-compare field-name="communicationEvent.statusId" operator="equals" type="String" value="COM_REFERRED"/>
- <if-compare field-name="communicationEvent.statusId" operator="equals" type="String" value="COM_CANCELLED"/>
- </or>
- </and>
- </condition>
- <actions>
- <set field="okayToUpdate" value="false" type="Boolean" global="true"/>
- </actions>
- <widgets/>
- </section>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="pre-body">
- <section>
- <condition>
- <and>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
- <not><if-empty field-name="communicationEvent"/></not>
- </and>
- </condition>
- <widgets>
- <include-menu location="component://party/webapp/partymgr/communication/CommMenus.xml" name="CommEventTabBar"/>
- <include-menu location="component://party/webapp/partymgr/communication/CommMenus.xml" name="CommSubTabBar"/>
- </widgets>
- </section>
- </decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission action="_VIEW" permission="PARTYMGR"/>
</condition>
<widgets>
- <section>
- <condition>
- <not><if-empty field-name="partyId"/></not>
- </condition>
- <widgets>
- <container style="button-bar button-style-2">
- <link target="/accounting/control/FindBillingAccount?partyId=${partyId}" url-mode="inter-app"
- text="${uiLabelMap.AccountingBillingAccount}"/>
- <section>
- <condition><if-has-permission permission="ORDERMGR" action="_VIEW"/></condition>
- <widgets>
- <link target="/ordermgr/control/searchorders?lookupFlag=Y&hideFields=Y&partyId=${partyId}&viewIndex=1&viewSize=20" url-mode="inter-app"
- text="${uiLabelMap.OrderOrders}"/>
- </widgets>
- </section>
- <section>
- <condition><if-has-permission permission="ORDERMGR" action="_CREATE"/></condition>
- <widgets>
- <link target="/ordermgr/control/checkinits?partyId=${partyId}" url-mode="inter-app"
- text="${uiLabelMap.OrderNewOrder}"/>
- </widgets>
- </section>
- <section>
- <condition><if-has-permission permission="ACCOUNTING" action="_VIEW"/></condition>
- <widgets>
- <link target="/accounting/control/findPayments?lookupFlag=Y&hideFields=Y&partyIdTo=${partyId}" url-mode="inter-app"
- text="${uiLabelMap.AccountingPaymentsSent}"/>
- <link target="/accounting/control/findPayments?lookupFlag=Y&hideFields=Y&partyIdFrom=${partyId}" url-mode="inter-app"
- text="${uiLabelMap.AccountingPaymentsReceived}"/>
- </widgets>
- </section>
- </container>
- </widgets>
- </section>
- <section>
- <widgets>
- <decorator-section-include name="body"/>
- </widgets>
- </section>
+ <include-menu location="component://party/webapp/partymgr/communication/CommMenus.xml" name="CommEventTabBar"/>
+ <include-menu location="component://party/webapp/partymgr/communication/CommMenus.xml" name="CommSubTabBar"/>
+ <decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml?rev=676259&r1=676258&r2=676259&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml Sat Jul 12 20:49:48 2008
@@ -151,22 +151,6 @@
<entity-one entity-name="CommunicationEvent" value-name="parentEvent" auto-field-map="false">
<field-map env-name="parentCommEventId" field-name="communicationEventId"/>
</entity-one>
- <entity-one entity-name="StatusItem" value-name="commEventStatusItem" auto-field-map="false">
- <field-map env-name="communicationEvent.statusId" field-name="statusId"/>
- </entity-one>
- <set field="COMM_EVENT" value="COM_EVENT_STATUS"/>
- <entity-one entity-name="ContactMechType" value-name="commEventContactMechType">
- <field-map env-name="communicationEvent.contactMechTypeId" field-name="contactMechTypeId"/>
- </entity-one>
- <entity-one entity-name="ContactMechType" value-name="parentEventContactMechType">
- <field-map env-name="parentEvent.contactMechTypeId" field-name="contactMechTypeId"/>
- </entity-one>
- <entity-one entity-name="RoleType" value-name="fromRoleType">
- <field-map env-name="communicationEvent.roleTypeIdFrom" field-name="roleTypeId"/>
- </entity-one>
- <entity-one entity-name="RoleType" value-name="toRoleType">
- <field-map env-name="communicationEvent.roleTypeIdTo" field-name="roleTypeId"/>
- </entity-one>
</actions>
<widgets>
<decorator-screen name="CommonCommunicationEventDecorator"
@@ -213,59 +197,53 @@
</widgets>
</section>
</screen>
- <screen name="EditCommunicationEvent">
- <section>
- <actions>
- <set field="titleProperty" value="PageTitleEditCommunication"/>
- <set field="tabButtonItem" value="CommunicationEvent"/>
- <set field="entityName" value="CommunicationEvent"/>
-
- <set field="communicationEventId" from-field="parameters.communicationEventId"/>
- <set field="parentCommEventId" from-field="parameters.parentCommEventId"/>
-
- <set field="partyId" from-field="parameters.partyId"/>
- <set field="partyIdFrom" from-field="parameters.partyIdFrom" default-value="${userLogin.partyId}"/>
- <set field="partyIdTo" from-field="parameters.partyIdTo"/>
- <set field="contactMechIdFrom" from-field="parameters.contactMechIdFrom"/>
- <set field="contactMechIdTo" from-field="parameters.contactMechIdTo"/>
- <set field="contactMechTypeId" from-field="parameters.contactMechTypeId"/>
-
- <entity-one entity-name="Party" use-cache="true" value-name="party"/>
- <entity-one entity-name="Person" use-cache="true" value-name="lookupPerson"/>
- <entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/>
- <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/FindCommEventContactMechs.groovy"/>
- <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
- <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
- </actions>
- <widgets>
- <decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="body">
- <section>
- <condition>
- <if-compare field-name="okayToUpdate" operator="equals" value="true" type="Boolean"/>
- </condition>
- <widgets>
- <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent}" collapsible="true">
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="EditCommEvent"/>
- </screenlet>
- <screenlet title="${uiLabelMap.PartyChildCommunicationEvents}" navigation-form-name="ListChildCommEvents">
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="ListChildCommEvents"/>
- </screenlet>
- </widgets>
- <fail-widgets>
- <screenlet id="ViewPartyNewCommunicationPanel" title="${uiLabelMap.PartyNewCommunication}" collapsible="true">
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="ViewCommEvent"/>
- </screenlet>
- <screenlet title="${uiLabelMap.PartyChildCommunicationEvents}" navigation-form-name="ListChildCommEvents">
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="ListChildCommEvents"/>
- </screenlet>
- </fail-widgets>
- </section>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
+ <screen name="EditCommunicationEvent">
+ <section>
+ <actions>
+ <set field="titleProperty" value="PageTitleEditCommunication" />
+ <set field="tabButtonItem" value="CommunicationEvent" />
+ <set field="entityName" value="CommunicationEvent" />
+ <set field="communicationEventId" from-field="parameters.communicationEventId" />
+ <set field="parentCommEventId" from-field="parameters.parentCommEventId" />
+ <set field="partyId" from-field="parameters.partyId" />
+ <set field="partyIdFrom" from-field="parameters.partyIdFrom"
+ default-value="${userLogin.partyId}" />
+ <set field="partyIdTo" from-field="parameters.partyIdTo" />
+ <set field="contactMechIdFrom" from-field="parameters.contactMechIdFrom" />
+ <set field="contactMechIdTo" from-field="parameters.contactMechIdTo" />
+ <set field="contactMechTypeId" from-field="parameters.contactMechTypeId" />
+ <entity-one entity-name="Party" use-cache="true"
+ value-name="party" />
+ <entity-one entity-name="Person" use-cache="true"
+ value-name="lookupPerson" />
+ <entity-one entity-name="CommunicationEvent" value-name="communicationEvent" />
+ <script
+ location="component://party/webapp/partymgr/WEB-INF/actions/communication/FindCommEventContactMechs.groovy" />
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" />
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer"
+ default-value="20" />
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonCommunicationEventDecorator"
+ location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <screenlet id="EditCommunicationEventPanel"
+ title="${uiLabelMap.PartyEditCommunicationEvent}" collapsible="true">
+ <include-form
+ location="component://party/webapp/partymgr/communication/CommForms.xml"
+ name="EditCommEvent" />
+ </screenlet>
+ <screenlet title="${uiLabelMap.PartyChildCommunicationEvents}"
+ navigation-form-name="ListChildCommEvents">
+ <include-form
+ location="component://party/webapp/partymgr/communication/CommForms.xml"
+ name="ListChildCommEvents" />
+ </screenlet>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
<screen name="newEmail">
<section>
@@ -327,71 +305,38 @@
</widgets>
</section>
</screen>
-
- <screen name="UpdateCommRoles">
- <section>
- <actions>
- <set field="titleProperty" value="PageTitleViewCommRoles"/>
- <set field="tabButtonItem" value="UpdateCommRoles"/>
-
- <set field="communicationEventId" from-field="parameters.communicationEventId"/>
- <set field="parentCommEventId" from-field="parameters.parentCommEventId"/>
- <set field="partyId" value="${parameters.partyId}"/>
- <set field="partyIdFrom" value="${parameters.partyId}"/>
- <set field="partyIdTo" value="${parameters.partyId}"/>
- <entity-one entity-name="Party" use-cache="true" value-name="party"/>
- <entity-one entity-name="Person" use-cache="true" value-name="lookupPerson"/>
- <entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/>
- <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
- <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
- </actions>
- <widgets>
- <decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="body">
- <section>
- <widgets>
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label text="${uiLabelMap.PartyCommEventRoles}"/>
- </container>
- </container>
- <container style="screenlet-body">
- <section>
- <widgets>
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="ListCommRoles"/>
- </widgets>
- </section>
- </container>
- </container>
- <section>
- <condition>
- <if-compare field-name="okayToUpdate" operator="equals" type="Boolean" value="true"/>
- </condition>
- <widgets>
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label text="${uiLabelMap.PartyNewCommRole}"/>
- </container>
- </container>
- <container style="screenlet-body">
- <section>
- <widgets>
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="AddEventRole"/>
- </widgets>
- </section>
- </container>
- </container>
- </widgets>
- </section>
- </widgets>
- </section>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
+ <screen name="UpdateCommRoles">
+ <section>
+ <actions>
+ <set field="titleProperty" value="PageTitleViewCommRoles" />
+ <set field="tabButtonItem" value="UpdateCommRoles" />
+ <set field="communicationEventId" from-field="parameters.communicationEventId" />
+ <set field="parentCommEventId" from-field="parameters.parentCommEventId" />
+ <set field="partyId" value="${parameters.partyId}" />
+ <set field="partyIdFrom" value="${parameters.partyId}" />
+ <set field="partyIdTo" value="${parameters.partyId}" />
+ <entity-one entity-name="Party" use-cache="true" value-name="party" />
+ <entity-one entity-name="Person" use-cache="true" value-name="lookupPerson" />
+ <entity-one entity-name="CommunicationEvent" value-name="communicationEvent" />
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" />
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer"
+ default-value="20" />
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonCommunicationEventDecorator"
+ location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <screenlet title="${uiLabelMap.PartyCommEventRoles}">
+ <container style="button-bar"><link style="smallSubmit" target="UpdateCommRoles?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyNewCommRole}"/></container>
+ <include-form
+ location="component://party/webapp/partymgr/communication/CommForms.xml"
+ name="ListCommRoles" />
+ </screenlet>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
<screen name="UpdateCommPurposes">
<section>
<actions>
@@ -413,45 +358,10 @@
<widgets>
<decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <section>
- <widgets>
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label text="${uiLabelMap.PartyCommEventPurposes}"/>
- </container>
- </container>
- <container style="screenlet-body">
- <section>
- <widgets>
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="ListCommPurposes"/>
- </widgets>
- </section>
- </container>
- </container>
- <section>
- <condition>
- <if-compare field-name="okayToUpdate" operator="equals" type="Boolean" value="true"/>
- </condition>
- <widgets>
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label text="${uiLabelMap.PartyNewCommPurpose}"/>
- </container>
- </container>
- <container style="screenlet-body">
- <section>
- <widgets>
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="AddEventPurpose"/>
- </widgets>
- </section>
- </container>
- </container>
- </widgets>
- </section>
- </widgets>
- </section>
+ <screenlet title="${uiLabelMap.PartyCommEventPurposes}">
+ <container style="button-bar"><link style="smallSubmit" target="AddCommContent?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyNewCommPurpose}"/></container>
+ <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="ListCommPurposes"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -474,28 +384,10 @@
<widgets>
<decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <section>
- <condition>
- <if-compare field-name="okayToUpdate" operator="equals" type="Boolean" value="true"/>
- </condition>
- <widgets>
- <container style="button-bar"><link style="smallSubmit" target="AddCommEventWorkEffort?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyNewCommWorkEffort}"/></container>
- </widgets>
- </section>
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label text="${uiLabelMap.PartyCommWorkEfforts}"/>
- </container>
- </container>
- <container style="screenlet-body">
- <section>
- <widgets>
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="ListCommWorkEfforts"/>
- </widgets>
- </section>
- </container>
- </container>
+ <screenlet title="${uiLabelMap.PartyCommWorkEfforts}">
+ <container style="button-bar"><link style="smallSubmit" target="AddCommEventWorkEffort?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyNewCommWorkEffort}"/></container>
+ <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="ListCommWorkEfforts"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -515,20 +407,9 @@
<widgets>
<decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label text="${uiLabelMap.PartyCommWorkEfforts}"/>
- </container>
- </container>
- <container style="screenlet-body">
- <section>
- <widgets>
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="AddCommEventWorkEffort"/>
- </widgets>
- </section>
- </container>
- </container>
+ <screenlet title="${uiLabelMap.PartyCommWorkEfforts}">
+ <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="AddCommEventWorkEffort"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -546,20 +427,9 @@
<widgets>
<decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label text="${uiLabelMap.PartyCommWorkEfforts}"/>
- </container>
- </container>
- <container style="screenlet-body">
- <section>
- <widgets>
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="AddCommEventWorkEffort"/>
- </widgets>
- </section>
- </container>
- </container>
+ <screenlet title="${uiLabelMap.PartyCommWorkEfforts}">
+ <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="AddCommEventWorkEffort"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -584,16 +454,10 @@
<if-service-permission service-name="partyCommunicationEventPermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
- <container style="h1"><label text="${uiLabelMap.PartyCommContent}"/></container>
- <section>
- <condition>
- <if-compare field-name="okayToUpdate" operator="equals" type="Boolean" value="true"/>
- </condition>
- <widgets>
- <container style="button-bar"><link style="smallSubmit" target="AddCommContent?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyAddCommContent}"/></container>
- </widgets>
- </section>
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="listCommContent"/>
+ <screenlet title="${uiLabelMap.PartyCommContent}">
+ <container style="button-bar"><link style="smallSubmit" target="AddCommContent?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyAddCommContent}"/></container>
+ <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="listCommContent"/>
+ </screenlet>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
@@ -624,8 +488,9 @@
<if-service-permission service-name="partyCommunicationEventPermissionCheck" main-action="CREATE"/>
</condition>
<widgets>
- <container style="h1"><label text="${uiLabelMap.PartyNewCommContent}"/></container>
- <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="addCommContent"/>
+ <screenlet title="${uiLabelMap.PartyNewCommContent}">
+ <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="addCommContent"/>
+ </screenlet>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>