Author: hansbak
Date: Mon Nov 23 12:45:36 2009 New Revision: 883323 URL: http://svn.apache.org/viewvc?rev=883323&view=rev Log: show communication even screens within in the communication portlet avoiding having required decorators. Modified: ofbiz/trunk/applications/marketing/data/SfaPortletData.xml ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Modified: ofbiz/trunk/applications/marketing/data/SfaPortletData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/data/SfaPortletData.xml?rev=883323&r1=883322&r2=883323&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/data/SfaPortletData.xml (original) +++ ofbiz/trunk/applications/marketing/data/SfaPortletData.xml Mon Nov 23 12:45:36 2009 @@ -20,6 +20,6 @@ <entity-engine-xml> <PortalPage portalPageId="SFA_MAIN" sequenceNum="0" portalPageName="Main" description="The SFA main page" ownerUserLoginId="_NA_"/> <PortalPageColumn portalPageId="SFA_MAIN" columnSeqId="00001"/> - <PortalPagePortlet portalPageId="SFA_MAIN" portalPortletId="Calendar" portletSeqId="00001" columnSeqId="00001" sequenceNum="0"/> - <PortalPagePortlet portalPageId="SFA_MAIN" portalPortletId="MyCommunications" portletSeqId="00001" columnSeqId="00001" sequenceNum="1"/> + <PortalPagePortlet portalPageId="SFA_MAIN" portalPortletId="MyCommunications" portletSeqId="00001" columnSeqId="00001" sequenceNum="0"/> + <PortalPagePortlet portalPageId="SFA_MAIN" portalPortletId="Calendar" portletSeqId="00001" columnSeqId="00001" sequenceNum="1"/> </entity-engine-xml> Modified: ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml?rev=883323&r1=883322&r2=883323&view=diff ============================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml Mon Nov 23 12:45:36 2009 @@ -231,6 +231,8 @@ header-row-style="header-row" default-table-style="basic-table"> <alt-target use-when="custRequest==null" target="createrequest"/> <auto-fields-service service-name="updateCustRequest" default-field-type="edit"/> + <field name="form"><hidden value="list"/></field> + <field name="portalPageId"><hidden value="${parameters.portalPageId}"/></field> <field name="custRequestId"><hidden/></field> <field name="communicationEventId"><hidden value="${communicationEvent.communicationEventId}"/></field> <field name="custRequestTypeId"> Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=883323&r1=883322&r2=883323&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Mon Nov 23 12:45:36 2009 @@ -589,7 +589,7 @@ <request-map uri="createrequest"> <security https="true" auth="true"/> <event type="service" invoke="createCustRequest"/> - <response name="success" type="view-home" value="RequestList"/> + <response name="success" type="view-last-noparam" value="RequestList"/> <response name="error" type="view" value="EditRequest"/> </request-map> @@ -737,8 +737,8 @@ <request-map uri="setCommunicationEventRoleStatus"> <security https="true" auth="true"/> <event type="service" invoke="setCommunicationEventRoleStatus"/> - <response name="success" type="view-home"/> - <response name="error" type="view-home"/> + <response name="success" type="view-last-noparam"/> + <response name="error" type="view-last"/> </request-map> <request-map uri="MyCommunicationEvents"> <security https="true" auth="true"/> @@ -772,8 +772,8 @@ <request-map uri="uploadAttachFiletoEmail"> <security https="true" auth="true"/> <event type="simple" invoke="createCommunicationEventContent" path="component://party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml"/> - <response name="success" type="view" value="EditCommunicationEvent"/> - <response name="error" type="view" value="EditCommunicationEvent"/> + <response name="success" type="view-home" value="EditCommunicationEvent"/> + <response name="error" type="view-home" value="EditCommunicationEvent"/> </request-map> <request-map uri="uploadAttachFile"> <security https="true" auth="true"/> @@ -809,19 +809,19 @@ <request-map uri="updateCommunicationEvent"> <security https="true" auth="true"/> <event type="service" invoke="updateCommunicationEvent"/> - <response name="success" type="view-home" value="EditCommunicationEvent"/> + <response name="success" type="view-last-noparam" value="EditCommunicationEvent"/> <response name="error" type="view" value="EditCommunicationEvent"/> </request-map> <request-map uri="sendCommunicationEvent"> <security https="true" auth="true"/> <event type="service" invoke="updateCommunicationEvent"/> - <response name="success" type="view-home" value="EditCommunicationEvent"/> + <response name="success" type="view-last-noparam" value="EditCommunicationEvent"/> <response name="error" type="view" value="EditCommunicationEvent"/> </request-map> <request-map uri="deleteCommunicationEvent"> <security https="true" auth="true"/> <event type="service" invoke="deleteCommunicationEvent"/> - <response name="success" type="view-home"/> + <response name="success" type="view-last-noparam"/> <response name="error" type="view-last"/> </request-map> <request-map uri="deleteUnknownCommunicationEvent"> @@ -854,8 +854,8 @@ <request-map uri="allocateMsgToParty"> <security https="true" auth="true"/> <event type="simple" path="component://party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml" invoke="allocateMsgToParty"/> - <response name="success" type="view-home"/> - <response name="error" type="view" value="ViewCommunicationEvent"/> + <response name="success" type="view-last-noparam"/> + <response name="error" type="view-last" value="ViewCommunicationEvent"/> </request-map> <request-map uri="createCommContentDataResource"> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml?rev=883323&r1=883322&r2=883323&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml Mon Nov 23 12:45:36 2009 @@ -196,32 +196,6 @@ </widgets> </section> </screen> - <screen name="CommonMyCommunicationEventDecorator"> - <section> - <actions> - <set field="headerItem" value="mycomm"/> - <set field="my" value="My" global="true"/> - </actions> - <widgets> - <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <section> - <condition> - <if-has-permission action="_VIEW" permission="PARTYMGR"/> - </condition> - <widgets> - <include-menu name="MyCommSubTabBar" location="component://party/widget/partymgr/PartyMenus.xml"/> - <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="CommonRequestDecorator"> <section> <actions/> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml?rev=883323&r1=883322&r2=883323&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml Mon Nov 23 12:45:36 2009 @@ -147,6 +147,8 @@ </entity-one> </actions> <alt-target use-when="communicationEvent!=null" target="sendCommunicationEvent"/> + <field name="form"><hidden/></field> + <field name="portalPageId"><hidden value="${parameters.portalPageId}"/></field> <field name="communicationEventId"><hidden/></field> <field name="communicationEventTypeId"><hidden value="EMAIL_COMMUNICATION"/></field> <field name="contactMechIdTo"><hidden value="${contactMechIdTo}"/></field> @@ -171,10 +173,10 @@ <field name="contentMimeTypeId"><hidden value="text/plain"/></field> <field name="content" title="${uiLabelMap.CommonContent}" encode-output="false"><textarea cols="72" rows="15" default-value="${parameters.content}"/></field> <field name="send" title=" " position="1" use-when="communicationEvent!=null"> - <hyperlink also-hidden="false" target-type="plain" description="${uiLabelMap.CommonSend}" target="javascript:(document.EditEmail.submit())"/> + <hyperlink also-hidden="false" target-type="plain" description="${uiLabelMap.CommonSend}" target="javascript:(document.EditEmail.form.value='list'),(document.EditEmail.submit())"/> </field> <field name="save" title=" " position="2" use-when="communicationEvent!=null"> - <hyperlink also-hidden="false" target-type="plain" description="${uiLabelMap.CommonSave}" target="javascript:(document.EditEmail.statusId.value='COM_PENDING'),(document.EditEmail.submit())"/> + <hyperlink also-hidden="false" target-type="plain" description="${uiLabelMap.CommonSave}" target="javascript:(document.EditEmail.form.value='list'),(document.EditEmail.statusId.value='COM_PENDING'),(document.EditEmail.submit())"/> </field> <field name="createButton" use-when="communicationEvent==null"><submit/></field> <field name="dummy" position="320"><hidden/></field> @@ -185,6 +187,8 @@ <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/recentVisitor.groovy"/> </actions> <alt-target use-when="communicationEvent!=null" target="updateCommunicationEvent"/> + <field name="form"><hidden/></field> + <field name="portalPageId"><hidden value="${parameters.portalPageId}"/></field> <field name="communicationEventId"><hidden/></field> <field name="communicationEventTypeId"><hidden value="COMMENT_NOTE"/></field> <field name="parentCommEventId"><hidden value="${parameters.parentCommEventId}"/></field> @@ -203,10 +207,10 @@ <field name="send" title=" " position="1" use-when="communicationEvent!=null"> <hyperlink also-hidden="true" target-type="plain" description="${uiLabelMap.CommonSend}" - target="javascript:(document.EditInternalNote.statusId.value='COM_ENTERED'),(document.EditInternalNote.datetimeStarted.value='${nowDate}'),(document.EditInternalNote.submit())"/> + target="javascript:(document.EditInternalNote.form.value='list'),(document.EditInternalNote.statusId.value='COM_ENTERED'),(document.EditInternalNote.datetimeStarted.value='${nowDate}'),(document.EditInternalNote.submit())"/> </field> <field name="save" title=" " position="2" use-when="communicationEvent!=null"> - <hyperlink also-hidden="true" target-type="plain" description="${uiLabelMap.CommonSave}" target="javascript:(document.EditInternalNote.submit())"/> + <hyperlink also-hidden="true" target-type="plain" description="${uiLabelMap.CommonSave}" target="javascript:(document.EditInternalNote.form.value='list'),(document.EditInternalNote.submit())"/> </field> <field name="createButton" use-when="communicationEvent==null"><submit/></field> <field name="dummy" position="320"><hidden/></field> @@ -448,11 +452,13 @@ <field name="partyId"><hidden/></field> <field name="communicationEventId"><hidden/></field> <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300" sort-field="true"> - <hyperlink description="${subject}[${communicationEventId}] " target="ViewCommunicationEvent"> + <hyperlink description="${subject}[${communicationEventId}] " target="${parameters._LAST_VIEW_NAME_}"> <parameter param-name="communicationEventId"/> <parameter param-name="partyId"/> <parameter param-name="roleTypeId"/> <parameter param-name="my"/> + <parameter param-name="form" value="view"/> + <parameter param-name="portalPageId" from-field="parameters.portalPageId"/> </hyperlink> </field> <field name="communicationEventTypeId"> @@ -838,10 +844,12 @@ <field name="delContentDataResource"><hidden value="Y"/></field> <field name="communicationEventId"><hidden/></field> <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300"> - <hyperlink description="${subject}" target="ViewCommunicationEvent"> + <hyperlink description="${subject}" target="${parameters._LAST_VIEW_NAME_}"> <parameter param-name="communicationEventId"/> <parameter param-name="partyId"/> <parameter param-name="my" value="My"/> + <parameter param-name="form" value="view"/> + <parameter param-name="portalPageId" from-field="parameters.portalPageId"/> </hyperlink> </field> <field name="entryDate"> @@ -856,6 +864,8 @@ <actions> <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy"/> </actions> + <field name="form"><hidden value="list"/></field> + <field name="portalPageId"><hidden value="${parameters.portalPageId}"/></field> <field name="donePage"><hidden value="${donePage}"/></field> <field name="communicationEventId"><hidden value="${parameters.communicationEventId}"/></field> <field name="partyId" entry-name="dummy" tooltip="${uiLabelMap.PartyLeaveEmpty}"><lookup target-form-name="LookupPartyName"/></field> @@ -911,10 +921,12 @@ <form name="ListDraftEmails" type="list" extends="ListCommEvents" extends-resource="component://party/widget/partymgr/CommunicationEventForms.xml" target="deleteCommunicationEvent" use-row-submit="true" header-row-style="header-row-2" list-name="commEventDraft"> <field name="subject"> - <hyperlink description="${subject}" target="EditCommunicationEvent"> + <hyperlink description="${subject}" target="${parameters._LAST_VIEW_NAME_}"> <parameter param-name="communicationEventId"/> <parameter param-name="partyId"/> <parameter param-name="my"/> + <parameter param-name="form" value="edit"/> + <parameter param-name="portalPageId" from-field="parameters.portalPageId"/> </hyperlink> </field> <field name="removeLink" title="${uiLabelMap.CommonDelete}" widget-style="smallSubmit"><submit/></field> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml?rev=883323&r1=883322&r2=883323&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml Mon Nov 23 12:45:36 2009 @@ -428,104 +428,7 @@ <widgets> <decorator-screen name="Common${my}CommunicationEventDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <section><!-- Email --> - <condition> - <and> - <or> - <if-compare field="communicationEvent.communicationEventTypeId" operator="equals" value="EMAIL_COMMUNICATION"/> - <if-compare field="communicationEvent.communicationEventTypeId" operator="equals" value="AUTO_EMAIL_COMM"/> - </or> - <if-compare field="my" operator="equals" value="My"/> - </and> - </condition> - <widgets> - <section> - <condition> - <if-empty field="communicationEvent"/> - </condition> - <widgets> - <screenlet title="${uiLabelMap.PartyCreateAddEmail} ${uiLabelMap.CommonFrom} ${parameters.partyIdFrom}"> - <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="EditEmail"/> - </screenlet> - </widgets> - <fail-widgets> - <screenlet title="${uiLabelMap.CommonFrom}: ${communicationEvent.partyIdFrom}, CommunicationEventId: ${communicationEvent.communicationEventId}"> - <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="EditEmail"/> - </screenlet> - <container style="lefthalf"> - <screenlet title="${uiLabelMap.PartyCommEventRoles}"> - <include-form name="ListCommRoles" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - <include-form name="AddEventRole" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - </screenlet> - </container> - <container style="righthalf"> - <screenlet title="${uiLabelMap.PartyCommContent}"> - <include-form name="listCommContent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - <include-form name="uploadContent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - </screenlet> - </container> - </fail-widgets> - </section> - <container style="clear"/> - </widgets> - </section> - <section> - <condition><!-- internal note --> - <and> - <if-compare field="communicationEvent.communicationEventTypeId" operator="equals" value="COMMENT_NOTE"/> - <if-compare field="my" operator="equals" value="My"/> - </and> - </condition> - <widgets> - <section> - <condition> - <if-empty field="communicationEvent"/> - </condition> - <widgets> - <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent} ${parameters.communicationEventId}"> - <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="EditInternalNote"/> - </screenlet> - </widgets> - <fail-widgets> - <container style="lefthalf"> - <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent} ${parameters.communicationEventId} ${uiLabelMap.CommonFrom} ${communicationEvent.partyIdFrom}"> - <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="EditInternalNote"/> - </screenlet> - </container> - <container style="righthalf"> - <screenlet title="${uiLabelMap.PartyCommEventRoles}"> - <include-form name="ListCommRoles" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - <include-form name="AddEventRole" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - </screenlet> - <screenlet title="${uiLabelMap.PartyCommContent}"> - <include-form name="listCommContent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - <include-form name="uploadContent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - </screenlet> - </container> - </fail-widgets> - </section> - </widgets> - </section> - <section> - <condition><!-- others and general communications in party--> - <or> - <if-empty field="my"/> - <and> - <if-compare field="communicationEvent.communicationEventTypeId" operator="not-equals" value="COMMENT_NOTE"/> - <if-compare field="communicationEvent.communicationEventTypeId" operator="not-equals" value="EMAIL_COMMUNICATION"/> - <if-compare field="communicationEvent.communicationEventTypeId" operator="not-equals" value="AUTO_EMAIL_COMM"/> - </and> - </or> - </condition> - <widgets> - <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent} ${parameters.communicationEventId}"> - <include-form name="EditCommEvent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - </screenlet> - <screenlet title="${uiLabelMap.PartyChildCommunicationEvents}" navigation-form-name="ListChildCommEvents"> - <include-form name="ListChildCommEvents" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - </screenlet> - </widgets> - </section> + <include-screen name="editCommEvent"/> </decorator-section> </decorator-screen> </widgets> @@ -862,64 +765,108 @@ <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/> <set field="internalNotesOnly" from-field="internalNotesOnly" default-value="false"/> <set field="partyId" from-field="communicationPartyId" default-value="${userLogin.partyId}"/> - <entity-condition entity-name="CommunicationEventAndRole" list="commEventsUnknown"> - <condition-list combine="and"> - <condition-expr field-name="statusId" operator="equals" value="COM_UNKNOWN_PARTY"/> - <condition-expr field-name="roleStatusId" operator="not-equals" value="COM_ROLE_COMPLETED"/> - <condition-expr field-name="partyId" operator="equals" value="${partyId}"/> - </condition-list> - <order-by field-name="entryDate"/> - </entity-condition> - <entity-condition entity-name="CommunicationEventAndRole" list="commEventDraft"> - <condition-list combine="and"> - <condition-expr field-name="statusId" operator="equals" value="COM_PENDING"/> - <condition-expr field-name="partyId" operator="equals" value="${partyId}"/> - <condition-expr field-name="roleTypeId" operator="equals" value="ORIGINATOR"/> - </condition-list> - <order-by field-name="entryDate"/> - </entity-condition> - <entity-one entity-name="PartyNameView" value-field="partyName"> - <field-map field-name="partyId" from-field="partyId"/> - </entity-one> - <entity-condition entity-name="CommunicationEventAndRole" list="commEventProgress"> - <condition-list combine="and"> - <condition-expr field-name="statusId" operator="equals" value="COM_IN_PROGRESS"/> - <condition-expr field-name="partyId" operator="equals" value="${partyId}"/> - <condition-expr field-name="roleTypeId" operator="equals" value="ORIGINATOR"/> - </condition-list> - <order-by field-name="entryDate"/> - </entity-condition> + <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/> </actions> <widgets> <screenlet title="${uiLabelMap.PartyCommunicationsOfParty}: ${partyName.firstName} ${partyName.middleName} ${partyName.lastName} ${partyName.groupName} [${partyId}] " navigation-menu-name="communicationsMenu" navigation-form-name="ListPartyCommEvents" name="myComms"> <include-menu name="communicationsMenu" location="component://party/widget/partymgr/PartyMenus.xml"/> - <section> + <section><!-- List my communication events --> <condition> - <not><if-empty field="commEventsUnknown"/></not> + <or> + <if-compare field="parameters.form" operator="equals" value="list"/> + <if-empty field="parameters.form"/> + </or> </condition> + <actions> + <set field="my" from-field="parameters.my" default-value="My"/> + </actions> <widgets> - <label style="h2" text="${uiLabelMap.PartyEmailsFromUnknownOrigin}"></label> - <include-form name="ListMyUnknownPartyEmails" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + <include-screen name="listMyCommEvents"/> </widgets> </section> - <include-form name="ListPartyCommEvents" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> - <section> + <section><!-- Overview communication event --> <condition> - <not><if-empty field="commEventDraft"/></not> + <if-compare field="parameters.form" operator="equals" value="view"/> </condition> + <actions> + <service service-name="setCommEventRoleToRead"/> + <set field="parentCommEventId" from-field="parameters.parentCommEventId"/> + <set field="partyIdFrom" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> + </actions> <widgets> - <label style="h2" text="${uiLabelMap.PartyDraftEmails}"></label> - <include-form name="ListDraftEmails" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + <include-menu location="component://party/widget/partymgr/PartyMenus.xml" name="MyCommSubTabBar"/> + <include-screen name="commOverview"/> </widgets> </section> - <section> + <section><!-- New communication event --> <condition> - <not><if-empty field="commEventProgress"/></not> + <and> + <if-compare field="parameters.form" operator="equals" value="new"/> + <if-empty field="communicationEvent"/> + </and> </condition> + <actions> + <service service-name="createCommunicationEvent"/> + <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/> + <set field="my" from-field="parameters.my" default-value=""/> + <set field="partyIdFrom" from-field="communicationEvent.partyIdFrom" default-value="${userLogin.partyId}"/> + <!-- if contactmechIdTo provided should override the one in the db record: see contacts.ftl where this is used. --> + <set field="contactMechIdTo" from-field="parameters.contactMechIdTo" default-value="${communicationEvent.contactMechIdTo}"/> + </actions> <widgets> - <label style="h2" text="${uiLabelMap.PartyInProgresstEmails}"></label> - <include-form name="ListProgressEmails" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + <include-screen name="editCommEvent"/> + </widgets> + <fail-widgets> + <section><!-- Edit communication event --> + <condition> + <or> + <if-compare field="parameters.form" operator="equals" value="edit"/> + <and> + <if-compare field="parameters.form" operator="equals" value="new"/> + <not><if-empty field="communicationEvent"/></not> + </and> + </or> + </condition> + <actions> + <set field="my" from-field="parameters.my" default-value=""/> + <set field="partyIdFrom" from-field="communicationEvent.partyIdFrom" default-value="${userLogin.partyId}"/> + <!-- if contactmechIdTo provided should override the one in the db record: see contacts.ftl where this is used. --> + </actions> + <widgets> + <include-screen name="editCommEvent"/> + </widgets> + </section> + </fail-widgets> + </section> + <section><!-- New cust request --> + <condition> + <if-compare field="parameters.form" operator="equals" value="request"/> + </condition> + <actions> + <set field="parentCommEventId" from-field="parameters.parentCommEventId"/> + <set field="partyIdFrom" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> + <set field="custRequestId" from-field="parameters.custRequestId"/> + <entity-one entity-name="CustRequest" value-field="custRequest"/> + <set field="statusId" from-field="custRequest.statusId"/> + <entity-one entity-name="StatusItem" value-field="currentStatus"/> + </actions> + <widgets> + <section> + <condition> + <if-compare field="parameters.small" operator="equals" value="Y"/> + </condition> + <widgets> + <screenlet title="${uiLabelMap.OrderRequest}"> + <include-form name="EditSmallCustRequest" location="component://order/widget/ordermgr/CustRequestForms.xml"/> + </screenlet> + </widgets> + <fail-widgets> + <screenlet title="${uiLabelMap.OrderRequest}"> + <include-form name="EditCustRequest" location="component://order/widget/ordermgr/CustRequestForms.xml"/> + </screenlet> + </fail-widgets> + </section> </widgets> </section> </screenlet> @@ -976,4 +923,171 @@ </widgets> </section> </screen> + <screen name="listMyCommEvents"> + <section> + <actions> + <entity-condition entity-name="CommunicationEventAndRole" list="commEventsUnknown"> + <condition-list combine="and"> + <condition-expr field-name="statusId" operator="equals" value="COM_UNKNOWN_PARTY"/> + <condition-expr field-name="roleStatusId" operator="not-equals" value="COM_ROLE_COMPLETED"/> + <condition-expr field-name="partyId" operator="equals" value="${partyId}"/> + </condition-list> + <order-by field-name="entryDate"/> + </entity-condition> + <entity-condition entity-name="CommunicationEventAndRole" list="commEventDraft"> + <condition-list combine="and"> + <condition-expr field-name="statusId" operator="equals" value="COM_PENDING"/> + <condition-expr field-name="partyId" operator="equals" value="${partyId}"/> + <condition-expr field-name="roleTypeId" operator="equals" value="ORIGINATOR"/> + </condition-list> + <order-by field-name="entryDate"/> + </entity-condition> + <entity-one entity-name="PartyNameView" value-field="partyName"> + <field-map field-name="partyId" from-field="partyId"/> + </entity-one> + <entity-condition entity-name="CommunicationEventAndRole" list="commEventProgress"> + <condition-list combine="and"> + <condition-expr field-name="statusId" operator="equals" value="COM_IN_PROGRESS"/> + <condition-expr field-name="partyId" operator="equals" value="${partyId}"/> + <condition-expr field-name="roleTypeId" operator="equals" value="ORIGINATOR"/> + </condition-list> + <order-by field-name="entryDate"/> + </entity-condition> + </actions> + <widgets> + <section> + <condition> + <not><if-empty field="commEventsUnknown"/></not> + </condition> + <widgets> + <label style="h2" text="${uiLabelMap.PartyEmailsFromUnknownOrigin}"></label> + <include-form name="ListMyUnknownPartyEmails" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + </widgets> + </section> + <include-form name="ListPartyCommEvents" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + <section> + <condition> + <not><if-empty field="commEventDraft"/></not> + </condition> + <widgets> + <label style="h2" text="${uiLabelMap.PartyDraftEmails}"></label> + <include-form name="ListDraftEmails" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + </widgets> + </section> + <section> + <condition> + <not><if-empty field="commEventProgress"/></not> + </condition> + <widgets> + <label style="h2" text="${uiLabelMap.PartyInProgresstEmails}"></label> + <include-form name="ListProgressEmails" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + </widgets> + </section> + </widgets> + </section> + </screen> + <screen name="editCommEvent"> + <section> + <widgets> + <section><!-- Email --> + <condition> + <and> + <or> + <if-compare field="communicationEvent.communicationEventTypeId" operator="equals" value="EMAIL_COMMUNICATION"/> + <if-compare field="communicationEvent.communicationEventTypeId" operator="equals" value="AUTO_EMAIL_COMM"/> + </or> + <if-compare field="my" operator="equals" value="My"/> + </and> + </condition> + <widgets> + <section> + <condition> + <if-empty field="communicationEvent"/> + </condition> + <widgets> + <screenlet title="${uiLabelMap.PartyCreateAddEmail} ${uiLabelMap.CommonFrom} ${parameters.partyIdFrom}"> + <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="EditEmail"/> + </screenlet> + </widgets> + <fail-widgets> + <screenlet title="${uiLabelMap.CommonFrom}: ${communicationEvent.partyIdFrom}, CommunicationEventId: ${communicationEvent.communicationEventId}"> + <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="EditEmail"/> + </screenlet> + <container style="lefthalf"> + <screenlet title="${uiLabelMap.PartyCommEventRoles}"> + <include-form name="ListCommRoles" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + <include-form name="AddEventRole" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + </screenlet> + </container> + <container style="righthalf"> + <screenlet title="${uiLabelMap.PartyCommContent}"> + <include-form name="listCommContent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + <include-form name="uploadContent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + </screenlet> + </container> + </fail-widgets> + </section> + <container style="clear"/> + </widgets> + </section> + <section><!-- Internal Note --> + <condition> + <and> + <if-compare field="communicationEvent.communicationEventTypeId" operator="equals" value="COMMENT_NOTE"/> + <if-compare field="my" operator="equals" value="My"/> + </and> + </condition> + <widgets> + <section> + <condition> + <if-empty field="communicationEvent"/> + </condition> + <widgets> + <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent} ${parameters.communicationEventId}"> + <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="EditInternalNote"/> + </screenlet> + </widgets> + <fail-widgets> + <container style="lefthalf"> + <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent} ${parameters.communicationEventId} ${uiLabelMap.CommonFrom} ${communicationEvent.partyIdFrom}"> + <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="EditInternalNote"/> + </screenlet> + </container> + <container style="righthalf"> + <screenlet title="${uiLabelMap.PartyCommEventRoles}"> + <include-form name="ListCommRoles" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + <include-form name="AddEventRole" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.PartyCommContent}"> + <include-form name="listCommContent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + <include-form name="uploadContent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + </screenlet> + </container> + </fail-widgets> + </section> + </widgets> + </section> + <section> + <condition><!-- others and general communications in party--> + <or> + <if-empty field="my"/> + <and> + <if-compare field="communicationEvent.communicationEventTypeId" operator="not-equals" value="COMMENT_NOTE"/> + <if-compare field="communicationEvent.communicationEventTypeId" operator="not-equals" value="EMAIL_COMMUNICATION"/> + <if-compare field="communicationEvent.communicationEventTypeId" operator="not-equals" value="AUTO_EMAIL_COMM"/> + </and> + </or> + </condition> + <widgets> + <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent} ${parameters.communicationEventId}"> + <include-form name="EditCommEvent" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.PartyChildCommunicationEvents}" navigation-form-name="ListChildCommEvents"> + <include-form name="ListChildCommEvents" location="component://party/widget/partymgr/CommunicationEventForms.xml"/> + </screenlet> + </widgets> + </section> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml?rev=883323&r1=883322&r2=883323&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml Mon Nov 23 12:45:36 2009 @@ -307,22 +307,26 @@ <condition> <if-has-permission permission="PARTYMGR_CME-EMAIL_CREATE"/> </condition> - <link target="NewDraftCommunicationEvent"> + <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}"> <condition> <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/> </condition> - <link target="NewDraftCommunicationEvent"> + <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}"> @@ -358,11 +362,13 @@ <if-empty field="communicationEvent"/> </and> </condition> - <link target="NewDraftCommunicationEvent"> + <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}"> @@ -372,11 +378,13 @@ <if-empty field="communicationEvent"/> </and> </condition> - <link target="NewDraftCommunicationEvent"> + <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}"> @@ -391,12 +399,14 @@ <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/> </and> </condition> - <link target="NewDraftCommunicationEvent"> + <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}"> @@ -411,12 +421,14 @@ <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/> </and> </condition> - <link target="NewDraftCommunicationEvent"> + <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}"> @@ -428,13 +440,15 @@ <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/> </and> </condition> - <link target="NewDraftCommunicationEvent"> + <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}"> @@ -464,9 +478,11 @@ <if-compare field="communicationEvent.statusId" operator="equals" value="COM_ENTERED"/> </and> </condition> - <link target="newrequest"> + <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}"> @@ -509,6 +525,8 @@ </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> Modified: ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml?rev=883323&r1=883322&r2=883323&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Mon Nov 23 12:45:36 2009 @@ -98,24 +98,6 @@ </section> </screen> - <screen name="CommonMyCommunicationEventDecorator"> - <section> - <actions> - <entity-one entity-name="CommunicationEvent" value-field="commEvent"> - <field-map field-name="communicationEventId" from-field="parameters.communicationEventId"/> - </entity-one> - </actions> - <widgets> - <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <include-menu location="component://party/widget/partymgr/PartyMenus.xml" name="MyCommSubTabBar"/> - <decorator-section-include name="body"/> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> - <screen name="CommonMyTaskDecorator"> <section> <widgets> |
Free forum by Nabble | Edit this page |