Author: hansbak
Date: Wed Aug 13 23:22:58 2008 New Revision: 685784 URL: http://svn.apache.org/viewvc?rev=685784&view=rev Log: corrected problem with decorator when a loginid has employee AND customer permissions Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=685784&r1=685783&r2=685784&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Wed Aug 13 23:22:58 2008 @@ -143,33 +143,44 @@ <screen name="main"> <section> <widgets> - <section> - <condition> - <if-has-permission permission="MYPAGE_EMPLOYEE" /> - </condition> - <widgets> - <include-screen name="mainEmployee" /> - </widgets> - </section> - <section> - <condition> - <if-has-permission permission="MYPAGE_CUSTOMER" /> - </condition> - <widgets> - <include-screen name="mainCustomer" /> - </widgets> - </section> - <section> - <condition> - <and> - <not><if-has-permission permission="MYPAGE_CUSTOMER"/></not> - <not><if-has-permission permission="MYPAGE_EMPLOYEE"/></not> - </and> - </condition> - <widgets> - <include-screen name="mainNoAccess" /> - </widgets> - </section> + <decorator-screen name="main-decorator" + location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <condition> + <if-has-permission permission="MYPAGE_EMPLOYEE" /> + </condition> + <actions> + <set field="decorator" value="Y"/> + </actions> + <widgets> + <include-screen name="mainEmployee" /> + </widgets> + </section> + <section> + <condition> + <if-has-permission permission="MYPAGE_CUSTOMER" /> + </condition> + <actions> + <set field="decorator" value="Y"/> + </actions> + <widgets> + <include-screen name="mainCustomer" /> + </widgets> + </section> + <section> + <condition> + <and> + <not><if-has-permission permission="MYPAGE_CUSTOMER"/></not> + <not><if-has-permission permission="MYPAGE_EMPLOYEE"/></not> + </and> + </condition> + <widgets> + <include-screen name="mainNoAccess" /> + </widgets> + </section> + </decorator-section> + </decorator-screen> </widgets> </section> </screen> @@ -201,74 +212,70 @@ </entity-condition> </actions> <widgets> - <decorator-screen name="main-decorator" - location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <section> - <condition> - <not><if-empty field-name="custRequests"/></not> - </condition> - <widgets> - <screenlet title="${uiLabelMap.IncomingCustRequests}" navigation-form-name="ListRequestList" > - <include-form name="ListRequestList" location="component://order/webapp/ordermgr/request/RequestForms.xml"/> - </screenlet> - </widgets> - </section> - <section> - <condition> - <if-compare field-name="preferences.userPrefMap.myCommunications" - operator="equals" value="Y" /> - </condition> - <widgets> - <include-screen name="MyCommunications" - location="component://mypage/widget/MyPageScreens.xml"/> - </widgets> - </section> - <section> - <condition> - <if-compare field-name="preferences.userPrefMap.otherCommunications" - operator="equals" value="Y" /> - </condition> - <widgets> - <include-screen name="OtherCommunications" - location="component://mypage/widget/MyPageScreens.xml" /> - </widgets> - </section> - <section> - <condition> - <if-compare field-name="preferences.userPrefMap.myCompanyComms" - operator="equals" value="Y" /> - </condition> - <widgets> - <include-screen name="MyCompanyComms" - location="component://mypage/widget/MyPageScreens.xml" /> - </widgets> - </section> - <section> - <condition> - <if-compare field-name="preferences.userPrefMap.myTasks" - operator="equals" value="Y" /> - </condition> - <widgets> - <include-screen name="MyTasks" - location="component://mypage/widget/MyPageScreens.xml" /> - </widgets> - </section> - <section> - <condition> - <if-compare field-name="preferences.userPrefMap.myTimesheet" - operator="equals" value="Y" /> - </condition> - <widgets> - <include-screen name="MyTimesheet" - location="component://mypage/widget/MyPageScreens.xml" /> - </widgets> - </section> - </decorator-section> - </decorator-screen> + <section> + <condition> + <not><if-empty field-name="custRequests"/></not> + </condition> + <widgets> + <screenlet title="${uiLabelMap.IncomingCustRequests}" navigation-form-name="ListRequestList" > + <include-form name="ListRequestList" location="component://order/webapp/ordermgr/request/RequestForms.xml"/> + </screenlet> + </widgets> + </section> + <section> + <condition> + <if-compare field-name="preferences.userPrefMap.myCommunications" + operator="equals" value="Y" /> + </condition> + <widgets> + <include-screen name="MyCommunications" + location="component://mypage/widget/MyPageScreens.xml"/> + </widgets> + </section> + <section> + <condition> + <if-compare field-name="preferences.userPrefMap.otherCommunications" + operator="equals" value="Y" /> + </condition> + <widgets> + <include-screen name="OtherCommunications" + location="component://mypage/widget/MyPageScreens.xml" /> + </widgets> + </section> + <section> + <condition> + <if-compare field-name="preferences.userPrefMap.myCompanyComms" + operator="equals" value="Y" /> + </condition> + <widgets> + <include-screen name="MyCompanyComms" + location="component://mypage/widget/MyPageScreens.xml" /> + </widgets> + </section> + <section> + <condition> + <if-compare field-name="preferences.userPrefMap.myTasks" + operator="equals" value="Y" /> + </condition> + <widgets> + <include-screen name="MyTasks" + location="component://mypage/widget/MyPageScreens.xml" /> + </widgets> + </section> + <section> + <condition> + <if-compare field-name="preferences.userPrefMap.myTimesheet" + operator="equals" value="Y" /> + </condition> + <widgets> + <include-screen name="MyTimesheet" + location="component://mypage/widget/MyPageScreens.xml" /> + </widgets> + </section> </widgets> </section> </screen> + <screen name="mainCustomer"> <section> <actions> @@ -278,39 +285,30 @@ </entity-and> </actions> <widgets> - <decorator-screen name="main-decorator" - location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <screenlet title="${uiLabelMap.MyCustRequests}" navigation-form-name="ListRequestList" > - <include-form name="ListCustRequests" location="component://mypage/widget/MyPageForms.xml"/> - </screenlet> - </decorator-section> - </decorator-screen> + <screenlet title="${uiLabelMap.MyCustRequests}" navigation-form-name="ListRequestList" > + <include-form name="ListCustRequests" location="component://mypage/widget/MyPageForms.xml"/> + </screenlet> </widgets> </section> </screen> + <screen name="mainNoAccess"> <section> <widgets> - <decorator-screen name="main-decorator" - location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <screenlet title="${uiLabelMap.CommonNoAccess}" navigation-form-name="ListRequestList" > - <container> - <label style="h1" text="${uiLabelMap.MyPageNoAccess1}"></label> - </container> - <container> - <label style="h2" text="${uiLabelMap.MyPageNoAccess2}"></label> - </container> - <container> - <label style="h3" text="${uiLabelMap.MyPageNoAccess3}"></label> - </container> - <container> - <label style="h3" text="${uiLabelMap.MyPageNoAccess4}"></label> - </container> - </screenlet> - </decorator-section> - </decorator-screen> + <screenlet title="${uiLabelMap.CommonNoAccess}" navigation-form-name="ListRequestList" > + <container> + <label style="h1" text="${uiLabelMap.MyPageNoAccess1}"></label> + </container> + <container> + <label style="h2" text="${uiLabelMap.MyPageNoAccess2}"></label> + </container> + <container> + <label style="h3" text="${uiLabelMap.MyPageNoAccess3}"></label> + </container> + <container> + <label style="h3" text="${uiLabelMap.MyPageNoAccess4}"></label> + </container> + </screenlet> </widgets> </section> </screen> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=685784&r1=685783&r2=685784&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Wed Aug 13 23:22:58 2008 @@ -131,17 +131,17 @@ <service service-name="getProjectTask" result-map-name="taskResult"> <field-map field-name="taskId" env-name="workEffortId"/> </service> - <set field="task" from-field="taskResult.taskInfo"/> </row-actions> <field name="custRequestName"><hyperlink description="${custRequestName} [${custRequestId}]" target="ViewRequest?custRequestId=${custRequestId}"/></field> <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field> <field name="createdDate" title="Date"><display type="date"/></field> <field name="statusId"><display-entity entity-name="StatusItem" description="${description}"/></field> - <field name="task.plannedStartDate"><display type="date"/></field> - <field name="task.plannedEndDate"><display type="date"/></field> - <field name="task.actualStartDate"><display type="date"/></field> - <field name="task.actualEndDate"><display type="date"/></field> - <field name="task.plannedHours"><display/></field> - <field name="task.actualHours"><display/></field> + <field name="currentStatusId" map-name="taskResult.taskInfo"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> + <field name="estimatedStartDate" map-name="taskResult.taskInfo"><display type="date"/></field> + <field name="estimatedCompletionDate" map-name="taskResult.taskInfo"><display type="date"/></field> + <field name="actualStartDate" map-name="taskResult.taskInfo"><display type="date"/></field> + <field name="actualCompletionDate" map-name="taskResult.taskInfo"><display type="date"/></field> + <field name="plannedHours" map-name="taskResult.taskInfo"><display/></field> + <field name="actualHours" map-name="taskResult.taskInfo"><display/></field> </form> </forms> \ No newline at end of file |
Free forum by Nabble | Edit this page |