Author: hansbak
Date: Sun Sep 28 23:08:13 2008 New Revision: 699994 URL: http://svn.apache.org/viewvc?rev=699994&view=rev Log: various changes for hiding buttons when not required and create workefforts at the same time as a customer requests Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectSimpleEvents.xml ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=699994&r1=699993&r2=699994&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Sun Sep 28 23:08:13 2008 @@ -481,7 +481,7 @@ <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <include-menu name="RequestSubTabBar" location="component://mypage/widget/MyPageMenus.xml"/> + <include-menu name="RequestSubTabBar" location="component://projectmgr/widget/Menus.xml"/> <decorator-section-include name="body"/> </decorator-section> </decorator-screen> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml?rev=699994&r1=699993&r2=699994&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Sun Sep 28 23:08:13 2008 @@ -193,15 +193,4 @@ <link target="RemoveCommunicationEventRole?communicationEventId=${parameters.communicationEventId}&roleTypeId=${communicationEventRole.roleTypeId}&partyId=${userLogin.partyId}&deleteCommEventIfLast=Y&delContentDataResource=Y"/> </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> - <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> </menus> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectSimpleEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectSimpleEvents.xml?rev=699994&r1=699993&r2=699994&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectSimpleEvents.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectSimpleEvents.xml Sun Sep 28 23:08:13 2008 @@ -24,5 +24,23 @@ <call-service service-name="createCustRequest" in-map-name="createCust"> <result-to-field result-name="custRequestId" field-name="custRequestId"/> </call-service> + <if-not-empty field="parameters.workEffortParentId"> + <set-service-fields service-name="createWorkEffort" map-name="parameters" to-map-name="createTask" /> + <set field="createTask.custRequestId" from-field="custRequestId"/> + <set field="createTask.workEffortName" from-field="parameters.custRequestName"/> + <call-service service-name="createWorkEffort" in-map-name="createTask" > + <result-to-field result-name="workEffortId" field-name="workEffortId"/> + </call-service> + <set field="updCust.statusId" value="CRQ_REVIEWED"/> + <set field="updCust.custRequestId" from-field="custRequestId"/> + <call-service service-name="updateCustRequest" in-map-name="updCust"/> + <if-not-empty field="parameters.partyId"> + <set field="assignParty.workEffortId" from-field="workEffortId"/> + <set field="assignParty.partyId" from-field="parameters.partyId"/> + <set field="assignParty.roleTypeId" from-field="parameters.roleTypeId"/> + <set field="assignParty.statusId" value="PAS_ASSIGNED"/> + <call-service service-name="assignPartyToWorkEffort" in-map-name="assignParty" /> + </if-not-empty> + </if-not-empty> </simple-method> </simple-methods> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=699994&r1=699993&r2=699994&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Sun Sep 28 23:08:13 2008 @@ -382,9 +382,19 @@ </menu> <menu name="RequestTabBar" menu-container-style="button-bar tab-bar" default-selected-style="selected" selected-menuitem-context-field-name="tabButtonItem"> <menu-item name="ViewRequest" title="${uiLabelMap.ProjectMgrView}"> + <condition> + <not><if-empty field-name="custRequest"/></not> + </condition> <link target="ViewRequest?custRequestId=${parameters.custRequestId}"/> </menu-item> <menu-item name="editRequest" title="${uiLabelMap.ProjectMgrEdit}"> + <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="EditRequest?custRequestId=${parameters.custRequestId}"/> </menu-item> </menu> @@ -398,6 +408,13 @@ </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> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml?rev=699994&r1=699993&r2=699994&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml Sun Sep 28 23:08:13 2008 @@ -20,8 +20,8 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> - <form name="ListRequests" type="list" - extends="ListRequestList" extends-resource="component://order/webapp/ordermgr/request/RequestForms.xml"> + <form name="ListRequests" type="list" extends="ListRequestList" extends-resource="component://order/webapp/ordermgr/request/RequestForms.xml" + paginate-target="requestlist" > <field name="createTaskFromRequest" title="${uiLabelMap.ProjectMgrCreateTaskFromRequest}" widget-style="buttontext"> <hyperlink description="${uiLabelMap.ProjectMgrCreateTaskFromRequest}" target="EditTaskFromRequest?custRequestId=${custRequestId}"/> </field> |
Free forum by Nabble | Edit this page |