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/11/24 05:44:01 UTC
svn commit: r720114 - in /ofbiz/trunk:
applications/content/src/org/ofbiz/content/layout/
applications/order/entitydef/
applications/order/script/org/ofbiz/order/request/
applications/order/webapp/ordermgr/request/
applications/order/widget/ordermgr/ s...
Author: hansbak
Date: Sun Nov 23 20:44:00 2008
New Revision: 720114
URL: http://svn.apache.org/viewvc?rev=720114&view=rev
Log:
show and enable to add content to customer requests
Added:
ofbiz/trunk/specialpurpose/mypage/widget/RequestForms.xml (with props)
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java
ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestEvents.xml
ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml
ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml
ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml
ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml
ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml
ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml
ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml
ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java Sun Nov 23 20:44:00 2008
@@ -85,7 +85,11 @@
formInput.put(fieldName, fieldStr);
//Debug.logVerbose("in uploadAndStoreImage, fieldName:" + fieldName + " fieldStr:" + fieldStr, "");
}
- if (fieldName.equals(uploadField)) imageFi = fi;
+ if (fieldName.equals(uploadField)){
+ imageFi = fi;
+ //MimeType of upload file
+ results.put("uploadMimeType", fi.getContentType());
+ }
}
if (imageFi == null ) {
Modified: ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Sun Nov 23 20:44:00 2008
@@ -1464,7 +1464,20 @@
<key-map field-name="requirementId"/>
</view-link>
</view-entity>
-
+ <view-entity entity-name="CustRequestAndContent"
+ package-name="org.ofbiz.order.request"
+ title="Customer Request And Content View Entity">
+ <description>Show Content of CustRequest</description>
+ <member-entity entity-alias="CRC" entity-name="CustRequestContent"/>
+ <member-entity entity-alias="CT" entity-name="Content"/>
+ <alias-all entity-alias="CRC">
+ <exclude field="contentId"/>
+ </alias-all>
+ <alias-all entity-alias="CT"/>
+ <view-link entity-alias="CRC" rel-entity-alias="CT">
+ <key-map field-name="contentId"/>
+ </view-link>
+ </view-entity>
<!-- ========================================================= -->
<!-- org.ofbiz.order.opportunity -->
Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestEvents.xml?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestEvents.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestEvents.xml Sun Nov 23 20:44:00 2008
@@ -43,23 +43,41 @@
</then>
</if>
<check-errors/>
-
- <!-- Create content from Existing content or new upload file -->
+ <!-- Create new content form upload file / set content from Existing content -->
<if-empty field="formInput.formInput.contentId">
- <set-service-fields service-name="createContentFromUploadedFile"
- map-name="formInput.formInput" to-map-name="inMap"/>
- <set field="inMap._uploadedFile_fileName" from-field="formInput.imageFileName"/>
- <set field="inMap.uploadedFile" from-field="formInput.imageData"/>
- <set field="inMap._uploadedFile_contentType" from-field="formInput.formInput.mimeTypeId"/>
- <call-service service-name="createContentFromUploadedFile" in-map-name="inMap">
- <result-to-field result-name="contentId" field-name="context.contentId"/>
- </call-service>
+ <if>
+ <condition>
+ <or>
+ <!-- Compaire MimeType between upload file and selected MimeType -->
+ <if-compare-field field="formInput.uploadMimeType" operator="equals" to-field="formInput.formInput.mimeTypeId"/>
+ <if-compare field="formInput.formInput.mimeTypeId" operator="equals" value="application/octet-stream" />
+ <if-compare field="formInput.formInput.mimeTypeId" operator="equals" value=""/>
+ </or>
+ </condition>
+ <then>
+ <!-- Create new content from upload file -->
+ <set-service-fields service-name="createContentFromUploadedFile"
+ map-name="formInput.formInput" to-map-name="inMap"/>
+ <set field="inMap._uploadedFile_fileName" from-field="formInput.imageFileName"/>
+ <set field="inMap.uploadedFile" from-field="formInput.imageData"/>
+ <set field="inMap._uploadedFile_contentType" from-field="formInput.uploadMimeType"/>
+ <call-service service-name="createContentFromUploadedFile" in-map-name="inMap">
+ <result-to-field result-name="contentId" field-name="context.contentId"/>
+ </call-service>
+ </then>
+ <else>
+ <add-error>
+ <fail-message message="Upload file type not match your selected."/>
+ </add-error>
+ </else>
+ </if>
+ <check-errors/>
<else>
+ <!--set content from Existing content-->
<set field="context.contentId" from-field="formInput.formInput.contentId"/>
</else>
</if-empty>
<set field="context.custRequestId" from-field="formInput.formInput.custRequestId"/>
-
<call-map-processor in-map-name="context" out-map-name="custRequestContext">
<simple-map-processor name="newCustRequestContent">
<process field="contentId">
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=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml Sun Nov 23 20:44:00 2008
@@ -96,7 +96,7 @@
<field name="lastModifiedDate"><display/></field>
</form>
<form name="ListRequestItems" type="list" use-row-submit="true" title="" list-name="custRequestItems"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate-target="requestitems">
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate-target="RequestItems">
<auto-fields-entity entity-name="CustRequestItem" default-field-type="display"/>
<field name="sequenceNum"></field>
<field name="custRequestId"><hidden/></field>
@@ -389,7 +389,7 @@
</field>
</form>
- <form name="ListRequestParty" type="list" use-row-submit="true" title="" list-name="custRequestParties" target="updateCustRequestParty"
+ <form name="ListRequestRoles" type="list" use-row-submit="true" title="" list-name="custRequestParties" target="updateCustRequestParty"
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar" paginate-target="RequestRoles">
<auto-fields-entity entity-name="CustRequestParty" default-field-type="display"/>
<field name="custRequestId"><hidden/></field>
@@ -539,19 +539,17 @@
</field>
<field name="createButton"><submit button-type="button"/></field>
</form>
- <form name="ListCustRequestContent" type="list" list-name="custRequestContents"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <alt-target use-when="tabButtonItem.equals("EditCustRequestContent")" target="EditCustRequestContent"/>
- <alt-target use-when="tabButtonItem.equals("ViewRequest")" target="ViewRequest"/>
- <field name="thruDate"><hidden/></field>
- <field name="custRequestId"><hidden/></field>
+ <form name="ListCustRequestContent" type="list" list-name="custRequstAndContents"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate-target="EditCustRequestContent">
+ <field name="custRequestId"><hidden/></field>
<field name="contentId">
<display-entity entity-name="Content" key-field-name="contentId" description="${contentName}" also-hidden="true">
<sub-hyperlink target="/content/control/ViewSimpleContent?contentId=${contentId}" description="[${contentId}]" link-style="buttontext" target-type="inter-app"/>
</display-entity>
</field>
+ <field name="mimeTypeId"><display/></field>
<field name="fromDate"><display/></field>
- <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" use-when="tabButtonItem.equals("EditCustRequestContent")">
+ <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" use-when="tabButtonItem.equals("custRequestContent")">
<hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteCustRequestContent?custRequestId=${custRequestId}&contentId=${contentId}&fromDate=${fromDate}"/>
</field>
</form>
Modified: ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml Sun Nov 23 20:44:00 2008
@@ -35,6 +35,13 @@
<link target="/requestitems?custRequestId=${custRequest.custRequestId}"/>
</menu-item>
<menu-item name="custRequestContent" title="Content">
+ <condition>
+ <and>
+ <not><if-empty field-name="custRequest"/></not>
+ <if-compare field-name="custRequest.statusId" operator="not-equals" value="CRQ_CANCELLED"/>
+ <if-compare field-name="custRequest.statusId" operator="not-equals" value="CRQ_COMPLETED"/>
+ </and>
+ </condition>
<link target="EditCustRequestContent?custRequestId=${custRequest.custRequestId}"/>
</menu-item>
</menu>
Modified: ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml Sun Nov 23 20:44:00 2008
@@ -74,6 +74,9 @@
<entity-and entity-name="CustRequestContent" list-name="custRequestContents" filter-by-date="true">
<field-map field-name="custRequestId" env-name="custRequestId"/>
</entity-and>
+ <entity-and entity-name="CustRequestAndContent" list-name="custRequestAndContents">
+ <field-map field-name="custRequestId" env-name="custRequestId"/>
+ </entity-and>
</actions>
<widgets>
<decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}">
@@ -103,7 +106,7 @@
<include-form name="ViewRequestWorkEfforts" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.CommonContent}" navigation-form-name="ListCustRequestContent">
- <include-form name="ListCustRequestContent" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ <include-form name="ListCustRequestContent" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
</screenlet>
</container>
</decorator-section>
@@ -151,7 +154,7 @@
<screenlet id="EditRequestRolePanel" title="${uiLabelMap.PageTitleEditRequestRoles}" collapsible="true">
<include-form name="EditRequestRole" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
</screenlet>
- <include-form name="ListRequestParty" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ <include-form name="ListRequestRoles" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -477,18 +480,17 @@
<set field="tabButtonItem" value="custRequestContent"/>
<set field="headerItem" value="request"/>
<set field="custRequestId" from-field="parameters.custRequestId"/>
- <entity-one entity-name="CustRequest" value-name="custRequest"/>
- <entity-and entity-name="CustRequestContent" list-name="custRequestContents" filter-by-date="true">
+ <entity-and entity-name="CustRequestAndContent" list-name="custRequstAndContents">
<field-map field-name="custRequestId" env-name="custRequestId"/>
</entity-and>
</actions>
<widgets>
<decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <screenlet id="AddCustRequestContentsPanel" title="${uiLabelMap.PageTitleAddContent}" collapsible="true">
- <include-form name="AddCustRequestContent" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
- </screenlet>
- <include-form name="ListCustRequestContent" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ <screenlet id="AddCustRequestContentsPanel" title="${uiLabelMap.PageTitleAddContent}" collapsible="true">
+ <include-form name="AddCustRequestContent" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ </screenlet>
+ <include-form name="ListCustRequestContent" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
Modified: ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml Sun Nov 23 20:44:00 2008
@@ -59,4 +59,5 @@
<SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="MYPAGE_CUSTOMER"/>
<SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="PARTYMGR_CME_UPDATE"/>
<SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="PROJECTMGR_ROLE_VIEW"/>
+ <SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="CONTENTMGR_ROLE_CREATE"/>
</entity-engine-xml>
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=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Sun Nov 23 20:44:00 2008
@@ -298,13 +298,13 @@
<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"/>
- <view-map name="ViewRequest" type="screen" page="component://projectmgr/widget/RequestScreens.xml#ViewRequest"/>
+ <view-map name="ViewRequest" type="screen" page="component://mypage/widget/MyPageScreens.xml#ViewRequest"/>
<view-map name="EditRequest" type="screen" page="component://mypage/widget/MyPageScreens.xml#EditRequest"/>
<view-map name="ListInvoices" type="screen" page="component://mypage/widget/MyPageScreens.xml#ListInvoices"/>
<view-map name="ListProjects" type="screen" page="component://mypage/widget/MyPageScreens.xml#ListProjects"/>
<view-map name="custPreferences" type="screen" page="component://mypage/widget/CommonScreens.xml#custPreferences"/>
<view-map name="EditCommunicationEvent" type="screen" page="component://mypage/widget/MyPageScreens.xml#EditCommunicationEvent"/>
<view-map name="addAttachmentEmail" type="screen" page="component://mypage/widget/MyPageScreens.xml#addAttachmentEmail"/>
- <view-map name="EditCustRequestContent" type="screen" page="component://order/widget/ordermgr/RequestScreens.xml#EditCustRequestContent"/>
+ <view-map name="EditCustRequestContent" type="screen" page="component://mypage/widget/MyPageScreens.xml#EditCustRequestContent"/>
</site-conf>
Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Sun Nov 23 20:44:00 2008
@@ -480,12 +480,26 @@
</screen>
<screen name="CommonRequestDecorator">
<section>
- <actions/>
+ <actions>
+ <set field="custRequestId" from-field="parameters.custRequestId"/>
+ <entity-one entity-name="CustRequest" value-name="custRequest"/>
+ </actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <include-menu name="RequestSubTabBar" location="component://projectmgr/widget/Menus.xml"/>
- <decorator-section-include name="body"/>
+ <section>
+ <condition>
+ <not><if-empty field-name="custRequest"/></not>
+ </condition>
+ <widgets>
+ <include-menu location="component://mypage/widget/MyPageMenus.xml" name="RequestTabBar"/>
+ </widgets>
+ </section>
+ <include-menu name="RequestSubTabBar" location="component://mypage/widget/MyPageMenus.xml"/>
+ <container>
+ <label style="h1">[${uiLabelMap.CommonId}:${custRequest.custRequestId}] ${custRequest.custRequestName}</label>
+ </container>
+ <decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Sun Nov 23 20:44:00 2008
@@ -286,4 +286,34 @@
<link target="RemoveCommunicationEventRole?communicationEventId=${parameters.communicationEventId}&roleTypeId=${communicationEventRole.roleTypeId}&partyId=${userLogin.partyId}&deleteCommEventIfLast=Y&delContentDataResource=Y"/>
</menu-item>
</menu>
+ <menu name="RequestTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <menu-item name="ViewRequest" title="Overview" >
+ <link target="ViewRequest?custRequestId=${custRequest.custRequestId}"/>
+ </menu-item>
+ <menu-item name="custRequestContent" title="Content">
+ <link target="EditCustRequestContent?custRequestId=${custRequest.custRequestId}"/>
+ </menu-item>
+ </menu>
+ <menu name="RequestSubTabBar" type="simple" menu-container-style="button-bar button-style-2">
+ <menu-item name="cancelledRequest" title="Cancel request" >
+ <condition>
+ <and>
+ <not><if-empty field-name="custRequest"/></not>
+ <if-compare field-name="custRequest.statusId" operator="not-equals" value="CRQ_CANCELLED"/>
+ <if-compare field-name="custRequest.statusId" operator="not-equals" value="CRQ_COMPLETED"/>
+ </and>
+ </condition>
+ <link target="setCustRequestStatus?custRequestId=${custRequestId}&statusId=CRQ_CANCELLED"/>
+ </menu-item>
+ <menu-item name="addContent" title="Add content">
+ <condition>
+ <and>
+ <not><if-empty field-name="custRequest"/></not>
+ <if-compare field-name="custRequest.statusId" operator="not-equals" value="CRQ_CANCELLED"/>
+ <if-compare field-name="custRequest.statusId" operator="not-equals" value="CRQ_COMPLETED"/>
+ </and>
+ </condition>
+ <link target="EditCustRequestContent?custRequestId=${custRequest.custRequestId}"/>
+ </menu-item>
+ </menu>
</menus>
\ 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=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Sun Nov 23 20:44:00 2008
@@ -416,14 +416,17 @@
<entity-and list-name="commEvents" entity-name="CommunicationEventAndCustRequest">
<field-map field-name="custRequestId" env-name="parameters.custRequestId"/>
</entity-and>
+ <entity-and entity-name="CustRequestAndContent" list-name="custRequestAndContents">
+ <field-map field-name="custRequestId" env-name="custRequestId"/>
+ </entity-and>
</actions>
<widgets>
<decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<container style="lefthalf">
- <platform-specific>
- <html><html-template location="component://order/webapp/ordermgr/request/requestInfo.ftl"/></html>
- </platform-specific>
+ <screenlet title="${uiLabelMap.OrderRequest} ${custRequest.custRequestId} ${uiLabelMap.CommonInformation}">
+ <include-form name="requestInfo" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ </screenlet>
<screenlet title="${uiLabelMap.PageTitleRequestItems}">
<include-form name="OverviewRequestItems" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
</screenlet>
@@ -444,6 +447,9 @@
<screenlet title="${uiLabelMap.WorkEffortWorkEfforts}" navigation-form-name="ViewRequestWorkEfforts">
<include-form name="ViewRequestWorkEfforts" location="component://mypage/widget/MyPageForms.xml"/>
</screenlet>
+ <screenlet title="${uiLabelMap.CommonContent}" navigation-form-name="ListCustRequestContent">
+ <include-form name="ListCustRequestContent" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ </screenlet>
</container>
</decorator-section>
</decorator-screen>
@@ -735,4 +741,32 @@
</widgets>
</section>
</screen>
+ <screen name="EditCustRequestContent">
+ <section>
+ <actions>
+ <set field="titleProperty" value="PageTitleEditRequestContent"/>
+ <set field="tabButtonItem" value="custRequestContent"/>
+ <set field="headerItem" value="request"/>
+ <set field="custRequestId" from-field="parameters.custRequestId"/>
+ <entity-one entity-name="Content" value-name="content"/>
+ <entity-one entity-name="CustRequest" value-name="custRequest"/>
+ <entity-and entity-name="CustRequestContent" list-name="custRequestContents" filter-by-date="true">
+ <field-map field-name="custRequestId" env-name="custRequestId"/>
+ </entity-and>
+ <entity-and entity-name="CustRequestAndContent" list-name="custRequestAndContents">
+ <field-map field-name="custRequestId" env-name="custRequestId"/>
+ </entity-and>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <screenlet id="AddCustRequestContentsPanel" title="${uiLabelMap.PageTitleAddContent}" collapsible="true">
+ <include-form name="AddCustRequestContent" location="component://mypage/widget/RequestForms.xml"/>
+ </screenlet>
+ <include-form name="ListCustRequestContent" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
</screens>
Added: ofbiz/trunk/specialpurpose/mypage/widget/RequestForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/RequestForms.xml?rev=720114&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/RequestForms.xml (added)
+++ ofbiz/trunk/specialpurpose/mypage/widget/RequestForms.xml Sun Nov 23 20:44:00 2008
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
+ <form name="AddCustRequestContent" type="upload" extends-resource="component://order/webapp/ordermgr/request/RequestForms.xml"
+ target="createCustRequestContent?custRequestId=${parameters.custRequestId}" >
+ <field name="custRequestId" map-name="parameters"><hidden/></field>
+ <field name="contentId"><hidden/></field>
+ <field name="contentTypeId"><hidden/></field>
+ <field name="statusId"><hidden/></field>
+ <field name="mimeTypeId"><hidden/></field>
+ <field name="dataResourceName" title="${uiLabelMap.CommonUpload}*"><file/></field>
+ <field name="dataCategoryId"><hidden/></field>
+ <field name="createButton"><submit button-type="button"/></field>
+ </form>
+</forms>
\ No newline at end of file
Propchange: ofbiz/trunk/specialpurpose/mypage/widget/RequestForms.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/specialpurpose/mypage/widget/RequestForms.xml
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/specialpurpose/mypage/widget/RequestForms.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Sun Nov 23 20:44:00 2008
@@ -487,5 +487,15 @@
</condition>
<link target="setCustRequestStatus?custRequestId=${custRequestId}&statusId=CRQ_CANCELLED"/>
</menu-item>
+ <menu-item name="addContent" title="Add content">
+ <condition>
+ <and>
+ <not><if-empty field-name="custRequest"/></not>
+ <if-compare field-name="custRequest.statusId" operator="not-equals" value="CRQ_CANCELLED"/>
+ <if-compare field-name="custRequest.statusId" operator="not-equals" value="CRQ_COMPLETED"/>
+ </and>
+ </condition>
+ <link target="EditCustRequestContent?custRequestId=${custRequest.custRequestId}"/>
+ </menu-item>
</menu>
</menus>
Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml?rev=720114&r1=720113&r2=720114&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml Sun Nov 23 20:44:00 2008
@@ -102,6 +102,9 @@
<entity-and entity-name="CustRequestContent" list-name="custRequestContents" filter-by-date="true">
<field-map field-name="custRequestId" env-name="custRequestId"/>
</entity-and>
+ <entity-and entity-name="CustRequestAndContent" list-name="custRequestAndContents">
+ <field-map field-name="custRequestId" env-name="custRequestId"/>
+ </entity-and>
</actions>
<widgets>
<decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}">
@@ -131,6 +134,7 @@
<include-form name="ViewRequestWorkEfforts" location="component://projectmgr/widget/forms/RequestForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.CommonContent}" navigation-form-name="ListCustRequestContent">
+ <link target="EditCustRequestContent?custRequestId=${custRequest.custRequestId}" text="New Content"/>
<include-form name="ListCustRequestContent" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
</screenlet>
</container>