Author: hansbak
Date: Sat Jul 12 22:27:41 2008 New Revision: 676262 URL: http://svn.apache.org/viewvc?rev=676262&view=rev Log: make the incoming email which unknown parties work with mypage Modified: ofbiz/trunk/specialpurpose/mypage/config/MyPageUiLabels.xml ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Modified: ofbiz/trunk/specialpurpose/mypage/config/MyPageUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/config/MyPageUiLabels.xml?rev=676262&r1=676261&r2=676262&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/config/MyPageUiLabels.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/config/MyPageUiLabels.xml Sat Jul 12 22:27:41 2008 @@ -26,6 +26,9 @@ <value xml:lang="en">My Profile</value> <value xml:lang="fr">Mon Profil</value> </property> + <property key="MyCompanyComms"> + <value xml:lang="en">Company Events</value> + </property> <property key="MyPageNewMessage"> <value xml:lang="en">New Message</value> <value xml:lang="fr">Nouveau message</value> @@ -34,8 +37,8 @@ <value xml:lang="en">Other Communications</value> <value xml:lang="fr">Autres communications</value> </property> - <property key="OtherCommunicationsOfParty"> - <value xml:lang="en">Other Communications of party</value> - <value xml:lang="fr">Autres communications ou acteur</value> + <property key="CommunicationsOfParty"> + <value xml:lang="en">Communications of party</value> + <value xml:lang="fr">Communications ou acteur</value> </property> </resource> Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml?rev=676262&r1=676261&r2=676262&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Sat Jul 12 22:27:41 2008 @@ -135,11 +135,17 @@ <response name="success" type="view" value="myCommunications"/> <response name="error" type="view" value="myCommunications"/> </request-map> - <request-map uri="deletePartyCommunicationEventOthers"> + <request-map uri="allocateMsgToParty"> <security https="true" auth="true"/> - <event type="service" invoke="deleteCommunicationEvent"/> - <response name="success" type="view" value="otherCommunications"/> - <response name="error" type="view" value="otherCommunications"/> + <event type="simple" path="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="allocateMsgToParty"/> + <response name="success" type="view" value="main"/> + <response name="error" type="view" value="ViewCommunicationEvent"/> + </request-map> + <request-map uri="allocateMyMsgToParty"> + <security https="true" auth="true"/> + <event type="simple" path="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="allocateMsgToParty"/> + <response name="success" type="view" value="myCommunications"/> + <response name="error" type="view" value="ViewCommunicationEvent"/> </request-map> <!-- PREFERENCES --> @@ -159,6 +165,18 @@ <security https="true" auth="true"/> <response name="success" type="view" value="otherCommunications"/> </request-map> + <request-map uri="deletePartyCommunicationEventOthers"> + <security https="true" auth="true"/> + <event type="service" invoke="deleteCommunicationEvent"/> + <response name="success" type="view" value="otherCommunications"/> + <response name="error" type="view" value="otherCommunications"/> + </request-map> + <request-map uri="allocateOtherMsgToParty"> + <security https="true" auth="true"/> + <event type="simple" path="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="allocateMsgToParty"/> + <response name="success" type="view" value="otherCommunications"/> + <response name="error" type="view" value="ViewOtherCommunicationEvent"/> + </request-map> <view-map name="main" type="screen" page="component://mypage/widget/CommonScreens.xml#main"/> <view-map name="preferences" type="screen" page="component://mypage/widget/CommonScreens.xml#preferences"/> @@ -168,5 +186,7 @@ <view-map name="myCompanyComms" type="screen" page="component://mypage/widget/CommonScreens.xml#MyCompanyComms"/> <view-map name="myTimesheet" type="screen" page="component://mypage/widget/CommonScreens.xml#MyTimesheet"/> <view-map name="newEvent" type="screen" page="component://mypage/widget/MyPageScreens.xml#newEvent"/> + <view-map name="ViewCommunicationEvent" type="screen" page="component://mypage/widget/MyPageScreens.xml#ViewCommunicationEvent"/> + </site-conf> Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=676262&r1=676261&r2=676262&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Sat Jul 12 22:27:41 2008 @@ -109,14 +109,13 @@ </screen> <screen name="CommonCommunicationEventDecorator"> <section> - <actions> - <set field="headerItem" value="comm"/> - <set field="communicationEventId" from-field="parameters.communicationEventId"/> - <entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/> - </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"/> + <decorator-section name="body"> + <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"/> + </decorator-section> </decorator-screen> </widgets> </section> @@ -156,7 +155,7 @@ </condition> <widgets> <include-screen name="MyCommunications" - location="component://mypage/widget/MyPageScreens.xml" /> + location="component://mypage/widget/MyPageScreens.xml"/> </widgets> </section> <section> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=676262&r1=676261&r2=676262&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Sat Jul 12 22:27:41 2008 @@ -103,8 +103,27 @@ <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deletePartyCommunicationEventOthers?partyId=${partyId}&communicationEventId=${communicationEventId}"/> </field> </form> + <form name="ListUnknownPartyEmails" extends="ListUnknownPartyEmails" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + + <field use-when="headerItem.equals("main")" name="subject" widget-style="buttontext" widget-area-style="fieldWidth300"> + <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&type=main"/> + </field> + <field use-when="headerItem.equals("myCommunications")" name="subject" widget-style="buttontext" widget-area-style="fieldWidth300"> + <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&type=my" /> + </field> + <field use-when="headerItem.equals("otherCommunications")" name="subject" widget-style="buttontext" widget-area-style="fieldWidth300"> + <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&type=other" /> + </field> + <field name="deleteSelectedButton" widget-style="smallSubmit"> + <submit /> + </field> + </form> <form name="allocateMsgToPartyForm" extends="allocateMsgToPartyForm" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml"> - <alt-target use-when="!headerItem.equals("main")" target="allocateMsgToPartyKey"/> + <alt-target use-when="headerItem.equals("otherCommunications")" target="allocateOtherMsgToParty"/> + <alt-target use-when="headerItem.equals("myCommunications")" target="allocateMyMsgToParty"/> + <field name="type"><hidden value="${parameters.type}"/></field> </form> + </forms> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=676262&r1=676261&r2=676262&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Sat Jul 12 22:27:41 2008 @@ -189,43 +189,67 @@ <section> <actions> <set field="partyId" from-field="userLogin.partyId" /> - <entity-condition entity-name="CommunicationEvent" list-name="commEvents"> - <condition-list combine="and"> - <condition-expr field-name="statusId" operator="not-equals" value="COM_UNKNOWN_PARTY"/> - <condition-list combine="or"> - <condition-expr field-name="partyIdFrom" operator="equals" value="${partyId}"/> - <condition-expr field-name="partyIdTo" operator="equals" value="${partyId}"/> - </condition-list> - </condition-list> - <order-by field-name="-lastUpdatedStamp"/> - </entity-condition> - <entity-condition entity-name="CommunicationEvent" list-name="commEventsUnknown"> - <condition-list combine="and"> - <condition-expr field-name="statusId" operator="equals" value="COM_UNKNOWN_PARTY"/> - <condition-expr field-name="partyIdTo" operator="equals" value="${partyId}"/> - </condition-list> - <order-by field-name="-lastUpdatedStamp"/> - </entity-condition> </actions> <widgets> - <screenlet title="${uiLabelMap.MyCommunications}" navigation-menu-name="MyCommunicationsMenu" - navigation-form-name="ListPartyCommEvents" name="myComms"> - <include-menu name="MyCommunicationsMenu" - location="component://mypage/widget/MyPageMenus.xml" /> - <section> - <condition> - <not><if-empty field-name="commEventsUnknown"/></not> - </condition> - <widgets> - <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="ListUnknownPartyEmails"/> - </widgets> - </section> - <include-form name="ListPartyCommEvents" - location="component://mypage/widget/MyPageForms.xml" /> - </screenlet> + <include-screen name="Communications"/> </widgets> - </section> + </section> </screen> + <screen name="Communications"> + <section> + <actions> + <entity-condition entity-name="CommunicationEvent" + list-name="commEvents"> + <condition-list combine="and"> + <condition-expr field-name="statusId" operator="not-equals" + value="COM_UNKNOWN_PARTY" /> + <condition-list combine="or"> + <condition-expr field-name="partyIdFrom" operator="equals" + value="${partyId}" /> + <condition-expr field-name="partyIdTo" operator="equals" + value="${partyId}" /> + </condition-list> + </condition-list> + <order-by field-name="-lastUpdatedStamp" /> + </entity-condition> + <entity-condition entity-name="CommunicationEvent" + list-name="commEventsUnknown"> + <condition-list combine="and"> + <condition-expr field-name="statusId" operator="equals" + value="COM_UNKNOWN_PARTY" /> + <condition-expr field-name="partyIdTo" operator="equals" + env-name="partyId" /> + </condition-list> + <order-by field-name="-lastUpdatedStamp" /> + </entity-condition> + <entity-one entity-name="PartyNameView" value-name="partyName"> + <field-map field-name="partyId" env-name="partyId"/> + </entity-one> + </actions> + <widgets> + <screenlet title="${uiLabelMap.CommunicationsOfParty}: ${partyName.firstName} ${partyName.middleName} ${partyName.lastName} ${partyName.groupName} [${partyId}] " + navigation-menu-name="MyCommunicationsMenu" navigation-form-name="ListPartyCommEvents" + name="myComms"> + <include-menu name="MyCommunicationsMenu" + location="component://mypage/widget/MyPageMenus.xml" /> + <section> + <condition> + <not> + <if-empty field-name="commEventsUnknown" /> + </not> + </condition> + <widgets> + <include-form + location="component://mypage/widget/MyPageForms.xml" + name="ListUnknownPartyEmails" /> + </widgets> + </section> + <include-form name="ListPartyCommEvents" + location="component://mypage/widget/MyPageForms.xml" /> + </screenlet> + </widgets> + </section> + </screen> <screen name="OtherCommunications"> <section> <actions> @@ -239,25 +263,110 @@ <section> <actions> <set field="partyId" from-field="emailOwner.partyIdTo" /> - <entity-one entity-name="PartyNameView" value-name="partyName"> - <field-map field-name="partyId" env-name="partyId"/> - </entity-one> </actions> <widgets> - <screenlet title="${uiLabelMap.OtherCommunicationsOfParty}: ${partyName.firstName} ${partyName.middleName} ${partyName.lastName} ${partyName.groupName} [${partyId}] " - navigation-menu-name="MyCommunicationsMenu" - navigation-form-name="ListPartyCommEvents" name="otherComms"> - <include-menu name="MyCommunicationsMenu" - location="component://mypage/widget/MyPageMenus.xml" /> - <include-form name="ListPartyCommEvents" - location="component://mypage/widget/MyPageForms.xml" /> - </screenlet> + <include-screen name="Communications"/> </widgets> </section> </iterate-section> </widgets> </section> </screen> + <screen name="ViewCommunicationEvent"> + <section> + <widgets> + <section> + <condition> + <if-compare field-name="parameters.type" operator="equals" + value="main" /> + </condition> + <actions> + <set field="headerItem" value="main" /> + </actions> + <widgets /> + </section> + <section> + <condition> + <if-compare field-name="parameters.type" operator="equals" + value="my" /> + </condition> + <actions> + <set field="headerItem" value="myCommunications" /> + </actions> + <widgets /> + </section> + <section> + <condition> + <if-compare field-name="parameters.type" operator="equals" + value="other" /> + </condition> + <actions> + <set field="headerItem" value="otherCommunications" /> + </actions> + <widgets /> + </section> + <section> + <actions> + <set field="titleProperty" value="PageTitleViewCommunication" /> + <set field="tabButtonItem" value="OverView" /> + <set field="parentCommEventId" from-field="parameters.parentCommEventId" /> + <entity-one entity-name="CommunicationEvent" + value-name="communicationEvent" /> + <entity-one entity-name="CommunicationEvent" + value-name="parentEvent" auto-field-map="false"> + <field-map env-name="parentCommEventId" field-name="communicationEventId" /> + </entity-one> + </actions> + <widgets> + <decorator-screen name="CommonCommunicationEventDecorator" + location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <condition> + <or><!-- have for e-mails a special form --> + <if-compare field-name="communicationEvent.communicationEventTypeId" + operator="equals" value="EMAIL_COMMUNICATION" /> + <if-compare field-name="communicationEvent.communicationEventTypeId" + operator="equals" value="AUTO_EMAIL_COMM" /> + </or> + </condition> + <widgets> + <section> + <condition> + <if-empty field-name="communicationEvent.partyIdFrom" /> + </condition> + <widgets> + <screenlet> + <container> + <label style="h1" text="Origin Email address not known!" /> + </container> + <container> + <label style="h2" + text="Allocate this message to a existing or new party and add an email address" /> + </container> + <include-form name="allocateMsgToPartyForm" + location="component://mypage/widget/MyPageForms.xml" /> + </screenlet> + </widgets> + </section> + <include-form + location="component://party/webapp/partymgr/communication/CommForms.xml" + name="ViewEmail" /> + </widgets> + <fail-widgets> + <include-form + location="component://party/webapp/partymgr/communication/CommForms.xml" + name="ViewCommEvent" /> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </widgets> + </section> + </screen> + </screens> |
Free forum by Nabble | Edit this page |