Author: hansbak
Date: Sat Aug 9 18:17:03 2008
New Revision: 684392
URL: http://svn.apache.org/viewvc?rev=684392&view=rev
Log:
add the communicationEventlist (copied the form: see issue OFBIZ-1914) and
related workefforts to the request view, also added a view to be able to do
this.
Modified:
ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml
ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml
Modified: ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?rev=684392&r1=684391&r2=684392&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Sat Aug 9
18:17:03 2008
@@ -1247,6 +1247,25 @@
<key-map field-name="communicationEventId"/>
</relation>
</view-entity>
+ <view-entity entity-name="CustRequestAndWorkEffort"
+ package-name="org.ofbiz.order.request"
+ title="Customer Request And WorkEffort">
+ <member-entity entity-alias="CRW" entity-name="CustRequestWorkEffort"/>
+ <member-entity entity-alias="WE" entity-name="WorkEffort"/>
+ <alias-all entity-alias="CRW">
+ <exclude field="workEffortId"/>
+ </alias-all>
+ <alias-all entity-alias="WE"/>
+ <view-link entity-alias="CRW" rel-entity-alias="WE">
+ <key-map field-name="workEffortId"/>
+ </view-link>
+ <relation type="one-nofk" rel-entity-name="CustRequest">
+ <key-map field-name="custRequestId"/>
+ </relation>
+ <relation type="one-nofk" rel-entity-name="WorkEffort">
+ <key-map field-name="workEffortId"/>
+ </relation>
+ </view-entity>
<view-entity entity-name="CustRequestNoteView"
package-name="org.ofbiz.order.request"
title="Customer Request and Note View Entity">
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml?rev=684392&r1=684391&r2=684392&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml Sat
Aug 9 18:17:03 2008
@@ -146,9 +146,46 @@
<field name="custRequestItemSeqId"><hidden/></field>
</form>
- <form name="ViewRequestCommunicationEvents" type="list"
extends="ListCommEvents"
-
extends-resource="component://party/webapp/partymgr/communication/CommForms.xml"
- paginate-target="ViewRequest">
+ <form name="ViewRequestCommunicationEvents" type="list"
extends="ListCommEvents">
+ <!--
extends-resource="component://party/webapp/partymgr/communication/CommForms.xml"-->
+ <field name="subject">
+ <hyperlink description="${subject}"
target="/partymgr/control/ViewCommunicationEvent?communicationEventId=${communicationEventId}"
target-type="inter-app"/>
+ </field>
+ </form>
+
+ <!-- copy of form from CommForms.xml because of loop problem see jira
issue: OFBIZ-1914 -->
+ <form name="ListCommEvents" type="list" odd-row-style="alternate-row"
default-table-style="basic-table hover-bar" paginate="true"
list-name="commEvents">
+ <row-actions>
+ <set field="subject" from-field="subject"
default-value="${uiLabelMap.PartyNoSubject}"/>
+ </row-actions>
+ <field name="communicationEventId"><hidden/></field>
+ <field name="subject">
+ <hyperlink description="${subject}"
target="ViewCommunicationEvent?communicationEventId=${communicationEventId}"/>
+ </field>
+ <field name="communicationEventTypeId"
title="${uiLabelMap.CommonType}"><display-entity description="${description}"
entity-name="CommunicationEventType"
key-field-name="communicationEventTypeId"/></field>
+ <field name="partyIdFrom" title="${uiLabelMap.CommonPartyID}
${uiLabelMap.CommonFrom}">
+ <display-entity description="${firstName} ${middleName}
${lastName} ${groupName}" entity-name="PartyNameView" key-field-name="partyId">
+ <sub-hyperlink
target="/partymgr/control/viewprofile?partyId=${partyIdFrom}"
target-type="inter-app" description="[${partyIdFrom}]"/>
+ </display-entity>
+ </field>
+ <field name="partyIdTo" title="${uiLabelMap.CommonPartyID}
${uiLabelMap.CommonTo}">
+ <display-entity description="${firstName} ${middleName}
${lastName} ${groupName}" entity-name="PartyNameView" key-field-name="partyId">
+ <sub-hyperlink
target="/partymgr/control/viewprofile?partyId=${partyIdTo}"
target-type="inter-app" description="[${partyIdTo}]"/>
+ </display-entity>
+ </field>
+ <field name="statusId"><display-entity description="${description}"
entity-name="StatusItem" key-field-name="statusId"/></field>
+ <field name="createdStamp"
title="${uiLabelMap.CommonCreated}"><display type="date"/></field>
+ <field name="datetimeStarted"
title="${uiLabelMap.CommonSend}"><display type="date"/></field>
+ </form>
+
+ <form name="ViewRequestWorkEfforts" type="list"
list-name="requestWorkEfforts"
+ odd-row-style="alternate-row" default-table-style="basic-table
hover-bar">
+ <field name="workEffortId">
+ <hyperlink
target="/workeffort/control/WorkEffortSummary?workEffortId=${workEffortId}"
description="${workEffortName} [${workEffortId}]" target-type="inter-app"/>
+ </field>
+ <field name="currentStatusId"><display-entity entity-name="StatusItem"
key-field-name="statusId" description="${description}"/></field>
+ <field name="startDate"><display type="date"/></field>
+ <field name="completionDate"><display type="date"/></field>
</form>
<form name="EditCustRequest" type="single" target="updaterequest"
title="Request" default-map-name="custRequest"
Modified: ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml?rev=684392&r1=684391&r2=684392&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml Sat Aug
9 18:17:03 2008
@@ -58,14 +58,44 @@
<get-related-one value-name="custRequest"
relation-name="CurrencyUom" to-value-name="currency"/>
<get-related-one value-name="custRequest"
relation-name="ProductStore" to-value-name="store"/>
<get-related-one value-name="custRequest"
relation-name="FulfillContactMech" to-value-name="fulfillContactMech"/>
- <set field="orderBy[]" value="sequenceNum"/>
+ <entity-and list-name="requestWorkEfforts"
entity-name="CustRequestAndWorkEffort">
+ <field-map field-name="custRequestId"
env-name="parameters.custRequestId"/>
+ </entity-and>
<get-related value-name="custRequest"
relation-name="CustRequestRole" list-name="requestRoles"/>
- <get-related value-name="custRequest"
relation-name="CustRequestItem" list-name="requestItems"
order-by-list-name="orderBy"/>
+ <set field="orderBy[]" value="sequenceNum"/>
+ <get-related value-name="custRequest"
relation-name="CustRequestItem" list-name="custRequestItems"
order-by-list-name="orderBy"/>
+ <entity-and list-name="commEvents"
entity-name="CommunicationEventAndCustRequest">
+ <field-map field-name="custRequestId"
env-name="parameters.custRequestId"/>
+ </entity-and>
</actions>
<widgets>
<decorator-screen name="CommonRequestDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <include-screen name="ViewRequestTemplate"
location="component://order/widget/ordermgr/RequestScreens.xml"/>
+ <container style="lefthalf">
+ <platform-specific>
+ <html><html-template
location="component://order/webapp/ordermgr/request/requestInfo.ftl"/></html>
+ </platform-specific>
+ <screenlet
title="${uiLabelMap.PageTitleRequestItems}">
+ <include-form
name="OverviewRequestItems"
location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ </screenlet>
+ </container>
+ <container style="righthalf">
+ <platform-specific>
+ <html><html-template
location="component://order/webapp/ordermgr/request/requestDate.ftl"/></html>
+ </platform-specific>
+ <platform-specific>
+ <html><html-template
location="component://order/webapp/ordermgr/request/requestContactMech.ftl"/></html>
+ </platform-specific>
+ <platform-specific>
+ <html><html-template
location="component://order/webapp/ordermgr/request/requestRoles.ftl"/></html>
+ </platform-specific>
+ <screenlet
title="${uiLabelMap.PartyListCommunicationEvents}"
navigation-form-name="ViewRequestCommunicationEvents">
+ <include-form
name="ViewRequestCommunicationEvents"
location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ </screenlet>
+ <screenlet
title="${uiLabelMap.WorkEffortWorkEfforts}"
navigation-form-name="ViewRequestWorkEfforts">
+ <include-form name="ViewRequestWorkEfforts"
location="component://mypage/widget/MyPageForms.xml"/>
+ </screenlet>
+ </container>
</decorator-section>
</decorator-screen>
</widgets>
@@ -77,30 +107,17 @@
<set field="titleProperty" value="OrderRequest"/>
<set field="tabButtonItem" value="request"/>
<set field="headerItem" value="request"/>
-
<set field="custRequestId"
from-field="parameters.custRequestId"/>
<entity-one entity-name="CustRequest"
value-name="custRequest"/>
-
<set field="statusId" from-field="custRequest.statusId"/>
<entity-one entity-name="StatusItem"
value-name="currentStatus"/>
</actions>
<widgets>
<decorator-screen name="CommonRequestDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label text="${uiLabelMap.OrderRequest}"/>
- </container>
- </container>
- <container style="screenlet-body">
- <section>
- <widgets>
- <include-form name="EditCustRequest"
location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
- </widgets>
- </section>
- </container>
- </container>
+ <screenlet title="${uiLabelMap.OrderRequest}">
+ <include-form name="EditCustRequest"
location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -431,85 +448,6 @@
</widgets>
</section>
</screen>
- <screen name="ViewRequestTemplate">
- <section>
- <condition>
- <not><if-empty field-name="custRequest"/></not>
- </condition>
- <widgets>
- <include-screen name="ViewRequestInfo"/>
- </widgets>
- <fail-widgets>
- <label
style="h3">${uiLabelMap.OrderErrorRequestNotFound}</label>
- </fail-widgets>
- </section>
- </screen>
- <screen name="ViewRequestInfo">
- <section>
- <actions>
- <entity-and list-name="commEvents"
entity-name="CommunicationEventAndCustRequest">
- <field-map field-name="custRequestId"
env-name="parameters.custRequestId"/>
- </entity-and>
- <entity-and entity-name="CustRequestItem"
list-name="custRequestItems">
- <field-map env-name="custRequestId"
field-name="custRequestId"/>
- <order-by field-name="sequenceNum"/>
- <order-by field-name="custRequestItemSeqId"/>
- </entity-and>
- </actions>
- <widgets>
- <container style="lefthalf">
- <include-screen name="requestInfo"/>
- <screenlet title="${uiLabelMap.PageTitleRequestItems}">
- <include-form name="OverviewRequestItems"
location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
- </screenlet>
- </container>
- <container style="righthalf">
- <include-screen name="requestDate"/>
- <include-screen name="requestContactMech"/>
- <include-screen name="requestRoles"/>
- <screenlet
title="${uiLabelMap.PartyListCommunicationEvents}"
navigation-form-name="ViewRequestCommunicationEvents">
- <include-form name="ViewRequestCommunicationEvents"
location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
- </screenlet>
- </container>
- </widgets>
- </section>
- </screen>
- <screen name="requestInfo">
- <section>
- <widgets>
- <platform-specific>
- <html><html-template
location="component://order/webapp/ordermgr/request/requestInfo.ftl"/></html>
- </platform-specific>
- </widgets>
- </section>
- </screen>
- <screen name="requestDate">
- <section>
- <widgets>
- <platform-specific>
- <html><html-template
location="component://order/webapp/ordermgr/request/requestDate.ftl"/></html>
- </platform-specific>
- </widgets>
- </section>
- </screen>
- <screen name="requestContactMech">
- <section>
- <widgets>
- <platform-specific>
- <html><html-template
location="component://order/webapp/ordermgr/request/requestContactMech.ftl"/></html>
- </platform-specific>
- </widgets>
- </section>
- </screen>
- <screen name="requestRoles">
- <section>
- <widgets>
- <platform-specific>
- <html><html-template
location="component://order/webapp/ordermgr/request/requestRoles.ftl"/></html>
- </platform-specific>
- </widgets>
- </section>
- </screen>
<screen name="ViewRequestItemInfo">
<section>
<condition>