Author: hansbak
Date: Mon Mar 30 06:49:26 2009 New Revision: 759853 URL: http://svn.apache.org/viewvc?rev=759853&view=rev Log: move timesheet back into project manager, corrected field format error in portletCategory entity (needs drop and reload from seed data) and general corrections Added: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml (with props) Modified: ofbiz/trunk/framework/common/entitydef/entitymodel.xml ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Modified: ofbiz/trunk/framework/common/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/entitydef/entitymodel.xml?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/framework/common/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/framework/common/entitydef/entitymodel.xml Mon Mar 30 06:49:26 2009 @@ -620,13 +620,13 @@ <prim-key field="portalPortletId"/> </entity> <entity entity-name="PortletCategory" package-name="org.ofbiz.common.portal" title="Portlet Category Entity"> - <field name="portletCategoryId" type="id-ne"></field> - <field name="description" type="id"></field> + <field name="portletCategoryId" type="id-ne"/> + <field name="description" type="description"/> <prim-key field="portletCategoryId"/> </entity> <entity entity-name="PortletPortletCategory" package-name="org.ofbiz.common.portal" title="Defines Portlets included into Categories"> - <field name="portalPortletId" type="id-ne"></field> - <field name="portletCategoryId" type="id-ne"></field> + <field name="portalPortletId" type="id-ne"/> + <field name="portletCategoryId" type="id-ne"/> <prim-key field="portalPortletId"/> <prim-key field="portletCategoryId"/> <relation type="one" fk-name="PPTLTCAT_PTPL" rel-entity-name="PortalPortlet"> Modified: ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml Mon Mar 30 06:49:26 2009 @@ -34,14 +34,14 @@ <PortalPage portalPageId="MYPORTAL_EMPLOYEE1" sequenceNum="100" portalPageName="My Profile" description="The OFBiz My Portal Profile page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPLOYEE"/> <PortalPage portalPageId="MYPORTAL_EMPLOYEE2" sequenceNum="200" portalPageName="Other Party Comms" description="The OFBiz My Portal other commmunication page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPLOYEE"/> <PortalPage portalPageId="MYPORTAL_EMPLOYEE3" sequenceNum="300" portalPageName="Company Events" description="The OFBiz My Portal Company Events page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPLOYEE"/> - <PortalPage portalPageId="MYPORTAL_EMPLOYEE4" sequenceNum="400" portalPageName="My Time Sheets" description="The OFBiz My Portal Timesheet page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPLOYEE"/> + <PortalPage portalPageId="MYPORTAL_EMPLOYEE4" sequenceNum="400" portalPageName="My Time Sheet" description="The OFBiz My Portal Timesheet page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPLOYEE"/> <PortalPage portalPageId="MYPORTAL_EMPLOYEE5" sequenceNum="500" portalPageName="My Tasks" description="The OFBiz My Portal My Task page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPLOYEE"/> <PortalPage portalPageId="MYPORTAL_EMPL-NOEML" sequenceNum="0" portalPageName="Main" description="The default OFBiz portal page" ownerUserLoginId="_NA_" securityGroupId="MYPORTAL_EMPL-NOEML" /> <PortalPage portalPageId="MYPORTAL_EMPL-NOEML1" sequenceNum="100" portalPageName="My Profile" description="The OFBiz My Portal Profile page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPL-NOEML"/> <PortalPage portalPageId="MYPORTAL_EMPL-NOEML2" sequenceNum="200" portalPageName="Other Party Comms" description="The OFBiz My Portal other commmunication page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPL-NOEML"/> <PortalPage portalPageId="MYPORTAL_EMPL-NOEML3" sequenceNum="300" portalPageName="Company Events" description="The OFBiz My Portal Company Events page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPL-NOEML"/> - <PortalPage portalPageId="MYPORTAL_EMPL-NOEML4" sequenceNum="400" portalPageName="My Time Sheets" description="The OFBiz My Portal Timesheet page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPL-NOEML"/> + <PortalPage portalPageId="MYPORTAL_EMPL-NOEML4" sequenceNum="400" portalPageName="My Time Sheet" description="The OFBiz My Portal Timesheet page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPL-NOEML"/> <PortalPage portalPageId="MYPORTAL_EMPL-NOEML5" sequenceNum="500" portalPageName="My Tasks" description="The OFBiz My Portal My Task page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_EMPL-NOEML"/> <PortalPage portalPageId="MYPORTAL_CUSTOMER" sequenceNum="0" portalPageName="Main" description="The default OFBiz portal page for a customers" ownerUserLoginId="_NA_" securityGroupId="MYPORTAL_CUSTOMER" /> @@ -74,12 +74,10 @@ <PortalPageColumn portalPageId="MYPORTAL_CUSTOMER3" columnSeqId="00001" /> <PortletCategory portletCategoryId="TASKS" description="Task(s)"/> - <PortletCategory portletCategoryId="TIMESHEETS" description="Timesheet(s)"/> <PortletCategory portletCategoryId="LIST_CUSTOMER" description="List(s) of Customer" /> <PortalPortlet portalPortletId="mycompanycomms" portletName="My Company Comms" screenName="MyCompanyComms" screenLocation="component://myportal/widget/MyPortalScreens.xml" description="My Company Comms From My Page" securityServiceName="portalPermissionIsEmployee" securityMainAction="VIEW" /> <PortalPortlet portalPortletId="mytasks" portletName="My Tasks" screenName="MyTasks" screenLocation="component://myportal/widget/MyPortalScreens.xml" description="My Tasks From My Page" securityServiceName="portalPermissionIsEmployee" securityMainAction="VIEW" /> - <PortalPortlet portalPortletId="mytimesheet" portletName="My Timesheet" screenName="MyTimesheet" screenLocation="component://myportal/widget/MyPortalScreens.xml" description="My Timesheet From My Page" securityServiceName="portalPermissionIsEmployee" securityMainAction="VIEW" /> <PortalPortlet portalPortletId="ListInvoices" portletName="List Invoices" screenName="ListInvoices" screenLocation="component://myportal/widget/MyPortalScreens.xml" description="List Invoices From MyPortal" securityServiceName="portalPermissionIsCustomer" securityMainAction="VIEW" /> <PortalPortlet portalPortletId="ListCustRequests" portletName="List Cust Requests" screenName="ListCustRequests" screenLocation="component://myportal/widget/MyPortalScreens.xml" description="List Cust Requests From MyPortal" securityServiceName="portalPermissionIsCustomer" securityMainAction="VIEW" /> <PortalPortlet portalPortletId="ListCustRequestsComp" portletName="List Cust Requests Completed" screenName="ListCustRequestsCompleted" screenLocation="component://myportal/widget/MyPortalScreens.xml" description="List Cust Requests Completed From MyPortal" securityServiceName="portalPermissionIsCustomer" securityMainAction="VIEW" /> @@ -142,7 +140,6 @@ <PortletPortletCategory portalPortletId="mycompanycomms" portletCategoryId="COMMUNICATIONS"/> <PortletPortletCategory portalPortletId="mytasks" portletCategoryId="TASKS"/> - <PortletPortletCategory portalPortletId="mytimesheet" portletCategoryId="TIMESHEETS"/> <PortletPortletCategory portalPortletId="ListInvoices" portletCategoryId="LIST_CUSTOMER"/> <PortletPortletCategory portalPortletId="ListCustRequests" portletCategoryId="LIST_CUSTOMER"/> Modified: ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml Mon Mar 30 06:49:26 2009 @@ -43,30 +43,6 @@ <response name="resultPage" type="view" value="newRegisterLogin"/> </request-map> - <!-- TIMESHEET --> - <request-map uri="myTimesheet"> - <security https="true" auth="true"/> - <response name="success" type="view" value="myTimesheet"/> - </request-map> - <request-map uri="updateTimesheet"> - <security https="true" auth="true"/> - <event type="service-multi" invoke="updateTimeEntryByWorkeffort"/> - <response name="success" type="view" value="getToNextDonePage"/> - <response name="error" type="view" value="getToNextDonePage"/> - </request-map> - <request-map uri="updateTimesheetKey"> - <security https="true" auth="true"/> - <event type="service-multi" invoke="updateTimeEntryByWorkeffort"/> - <response name="success" type="view" value="myTimesheet"/> - <response name="error" type="view" value="myTimesheet"/> - </request-map> - <request-map uri="statusToCompleteKey"> - <security https="true" auth="true"/> - <event type="service" invoke="updateTimesheet"/> - <response name="success" type="request" value="myTimesheet"/> - <response name="error" type="request" value="getToNextDonePage"/> - </request-map> - <!-- MY TASKS --> <request-map uri="myTasks"> <security https="true" auth="true"/> @@ -100,86 +76,6 @@ <response name="success" type="request" value="myCompanyComms"/> </request-map> - <!-- MY COMMUNICATIONS --> - <!--request-map uri="myCommunications"> - <security https="true" auth="true"/> - <response name="success" type="view" value="myCommunications"/> - </request-map> - <request-map uri="createCommunicationEvent"> - <security https="true" auth="true"/> - <event type="service" invoke="createCommunicationEvent"/> - <response name="success" type="request" value="myCommunications"/> - <response name="error" type="request-redirect" value="showPortalPage"/> - </request-map> - <request-map uri="deletePartyCommunicationEvent"> - <security https="true" auth="true"/> - <event type="service" invoke="deleteCommunicationEvent"/> - <response name="success" type="request" value="myCommunications"/> - </request-map> - <request-map uri="RemoveCommunicationEventRole"> - <security https="true" auth="true"/> - <event type="service" invoke="removeCommunicationEventRole"/> - <response name="success" type="request" value="myCommunications"/> - <response name="error" type="request" value="getToNextDonePage"/> - </request-map> - <request-map uri="allocateMsgToParty"> - <security https="true" auth="true"/> - <event type="simple" path="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="allocateMsgToParty"/> - <response name="success" type="request" value="getToNextDonePage"/> - <response name="error" type="view" value="ViewCommunicationEvent"/> - </request-map> - - <request-map uri="deleteCommunicationEvents"> - <security https="true" auth="true"/> - <event type="service-multi" invoke="deleteCommunicationEventWorkEffort"/> - <response name="success" type="request" value="myCommunications"/> - </request-map--> - - <!-- OTHER COMMUNICATIONS --> - <!--request-map uri="otherCommunications"> - <security https="true" auth="true"/> - <response name="success" type="view" value="otherCommunications"/> - </request-map> - <request-map uri="setCommunicationEventRoleStatus"> - <security https="true" auth="true"/> - <event type="service" invoke="setCommunicationEventRoleStatus"/> - <response name="success" type="request" value="getToNextDonePage"/> - <response name="error" type="request-redirect-noparam" value="showPortalPage"/> - </request-map> - <request-map uri="ViewCommunicationEvent"> - <security https="true" auth="true"/> - <event type="simple" invoke="setCommEventToRead" path="org/ofbiz/myportal/Events.xml"/> - <response name="success" type="view" value="ViewCommunicationEvent"/> - <response name="error" type="request" value="getToNextDonePage"/> - </request-map> - - <request-map uri="deleteUnknownCommunicationEvent"> - <security https="true" auth="true"/> - <event type="service" invoke="deleteCommunicationEvent"/> - <response name="success" type="request" value="getToNextDonePage"/> - <response name="error" type="view" value="ViewCommunicationEvent"/> - </request-map--> - - <!-- to clean up old data --> - <!--request-map uri="createCommEventRoles"> - <security https="true" auth="true"/> - <event type="simple" invoke="createCommunicationEventRoles" path="org/ofbiz/myportal/Events.xml"/> - <response name="success" type="request" value="getToNextDonePage"/> - <response name="error" type="request-redirect-noparam" value="showPortalPage"/> - </request-map> - - <request-map uri="getToNextDonePage"> - <security https="true" auth="true"/> - <event type="simple" invoke="getToNextDonePage" path="org/ofbiz/myportal/Events.xml"/> - <response name="main" type="request-redirect" value="showPortalPage"/> - <response name="ViewCommunicationEvent" type="request" value="ViewCommunicationEvent"/> - <response name="otherCommunications" type="request" value="otherCommunications"/> - <response name="myTimesheet" type="request" value="myTimesheet"/> - <response name="myTasks" type="request" value="myTasks"/> - <response name="myCompanyComms" type="request" value="myCompanyComms"/> - <response name="error" type="request-redirect-noparam" value="showPortalPage"/> - </request-map--> - <!-- Create Customer Request--> <request-map uri="newrequest"> <security https="true" auth="true"/> @@ -206,56 +102,6 @@ <response name="success" type="view" value="ListProjects"/> </request-map> - <!-- EMAIL COMMUNICATIONS --> - <!--request-map uri="NewCommunicationEvents"> - <security https="true" auth="true"/> - <response name="success" type="view" value="EditCommunicationEvent"/> - </request-map> - - <request-map uri="NewCommunicationEvent"> - <security https="true" auth="true"/> - <event type="service" invoke="createCommunicationEvent"/> - <response name="success" type="view" value="EditCommunicationEvent"/> - </request-map> - - <request-map uri="updateCommunicationEvent"> - <security https="true" auth="true"/> - <event type="service" invoke="updateCommunicationEvent"/> - <response name="success" type="view" value="main"/> - <response name="error" type="view" value="ViewCommunicationEvent"/> - </request-map> - - <request-map uri="addAttachmentEmail"> - <security https="true" auth="true"/> - <response name="success" type="view" value="addAttachmentEmail"/> - </request-map> - - <request-map uri="addContentToCommEvent"> - <security https="true" auth="true"/> - <event type="simple" path="org/ofbiz/myportal/Events.xml" invoke="addContentToCommEvent"/> - <response name="success" type="request" value="NewCommunicationEvents"/> - <response name="error" type="view" value="EditCommunicationEvent"/> - </request-map> - - <request-map uri="uploadAttachFiletoEmail"> - <security https="true" auth="true"/> - <event type="simple" path="org/ofbiz/myportal/Events.xml" invoke="createCommunicationContent"/> - <response name="success" type="request" value="NewCommunicationEvents"/> - <response name="error" type="view" value="EditCommunicationEvent"/> - </request-map> - - <request-map uri="removeAttachFile"> - <security https="true" auth="true"/> - <event type="service" invoke="removeCommEventContentAssoc"/> - <response name="success" type="request" value="NewCommunicationEvents"/> - <response name="error" type="view" value="EditCommunicationEvent"/> - </request-map> - - <request-map uri="EditCommunicationEvent"> - <security https="true" auth="true"/> - <response name="success" type="view" value="EditCommunicationEvent"/> - </request-map--> - <!-- CustRequest Content --> <request-map uri="EditCustRequestContent"> <security https="true" auth="true"/> @@ -281,13 +127,9 @@ <view-map name="newRegisterLogin" type="screen" page="component://myportal/widget/CommonScreens.xml#newRegisterLogin"/> <view-map name="myTasks" type="screen" page="component://myportal/widget/CommonScreens.xml#MyTasks"/> <view-map name="myCompanyComms" type="screen" page="component://myportal/widget/CommonScreens.xml#MyCompanyComms"/> - <view-map name="myTimesheet" type="screen" page="component://myportal/widget/CommonScreens.xml#MyTimesheet"/> <view-map name="newEvent" type="screen" page="component://myportal/widget/MyPortalScreens.xml#newEvent"/> <view-map name="ViewRequest" type="screen" page="component://myportal/widget/MyPortalScreens.xml#ViewRequest"/> <view-map name="EditRequest" type="screen" page="component://myportal/widget/MyPortalScreens.xml#EditRequest"/> <view-map name="ListInvoices" type="screen" page="component://myportal/widget/MyPortalScreens.xml#ListInvoices"/> <view-map name="ListProjects" type="screen" page="component://myportal/widget/MyPortalScreens.xml#ListProjects"/> - <!--view-map name="EditCommunicationEvent" type="screen" page="component://myportal/widget/MyPortalScreens.xml#EditCommunicationEvent"/> - <view-map name="addAttachmentEmail" type="screen" page="component://myportal/widget/MyPortalScreens.xml#addAttachmentEmail"/> - <view-map name="EditCustRequestContent" type="screen" page="component://myportal/widget/MyPortalScreens.xml#EditCustRequestContent"/--> </site-conf> Modified: ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Mon Mar 30 06:49:26 2009 @@ -85,7 +85,7 @@ </section> </screen> - <screen name="CommonTimesheetDecorator"> + <screen name="CommonMyTimeDecorator"> <section> <actions> <set field="headerItem" value="${parameters.portalPageId}"/> Modified: ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml Mon Mar 30 06:49:26 2009 @@ -43,7 +43,7 @@ </widgets> </section> </screen> - <screen name="MyTimesheet"> + <!--screen name="MyTimesheet"> <section> <actions> <set field="headerItem" value="myTimesheet"/> @@ -91,7 +91,7 @@ </section> </widgets> </section> - </screen> + </screen--> <screen name="MyTasks"> <section> <actions> Added: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml?rev=759853&view=auto ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml (added) +++ ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml Mon Mar 30 06:49:26 2009 @@ -0,0 +1,30 @@ +<?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. +--> +<entity-engine-xml> + + <PortletCategory portletCategoryId="PROJECTMANAGER" description="Project Manager portlets"/> + <PortalPortlet portalPortletId="mytimesheet" + portletName="My Timesheet" + screenName="CurrentTimesheet" + screenLocation="component://projectmgr/widget/TimeSheetScreens.xml" + description="My Current Timesheet" securityServiceName="portalPermissionIsEmployee" securityMainAction="VIEW" /> + <PortletPortletCategory portalPortletId="mytimesheet" portletCategoryId="PROJECTMANAGER"/> + +</entity-engine-xml> Propchange: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml Mon Mar 30 06:49:26 2009 @@ -30,6 +30,7 @@ <entity-resource type="data" reader-name="seed" loader="main" location="data/ProjectMgrTypeData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/ProjectMgrSecurityData.xml"/> + <entity-resource type="data" reader-name="seed" loader="main" location="data/ProjectMgrPortletData.xml"/> <entity-resource type="data" reader-name="demo" loader="main" location="data/ProjectMgrDemoData.xml"/> <entity-resource type="data" reader-name="demo" loader="main" location="data/ProjectMgrDemoPasswordData.xml"/> Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy Mon Mar 30 06:49:26 2009 @@ -37,21 +37,20 @@ // show the requested timesheet, otherwise the current , if not exist create timesheet = null; timesheetId = parameters.timesheetId; -//Debug.logInfo("====editweek: " + partyId + " timesheetId: " + timesheetId +"=========="); if (timesheetId) { timesheet = delegator.findByPrimaryKey("Timesheet", ["timesheetId" : timesheetId]); partyId = timesheet.partyId; // use the party from this timesheet - } else { - start = UtilDateTime.getWeekStart(UtilDateTime.nowTimestamp()); - timesheets = delegator.findByAnd("Timesheet", ["partyId" : partyId, "fromDate" : start]); - if (timesheets) { - timesheet = timesheets[0]; - } else { - result = dispatcher.runSync("createProjectTimesheet", ["userLogin" : parameters.userLogin, "partyId" : partyId]); - if (result && result.timesheetId) { - timesheet = delegator.findByPrimaryKey("Timesheet", ["timesheetId" : result.timesheetId]); - } +} else { + start = UtilDateTime.getWeekStart(UtilDateTime.nowTimestamp()); + timesheets = delegator.findByAnd("Timesheet", ["partyId" : partyId, "fromDate" : start]); + if (timesheets) { + timesheet = timesheets[0]; + } else { + result = dispatcher.runSync("createProjectTimesheet", ["userLogin" : parameters.userLogin, "partyId" : partyId]); + if (result && result.timesheetId) { + timesheet = delegator.findByPrimaryKey("Timesheet", ["timesheetId" : result.timesheetId]); } + } } if (!timesheet) return; context.timesheet = timesheet; Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Mon Mar 30 06:49:26 2009 @@ -483,7 +483,10 @@ <condition> <if-compare field="timesheet.statusId" operator="equals" value="TIMESHEET_IN_PROCESS"/> </condition> - <link target="${my}StatusToComplete?timesheetId=${timesheet.timesheetId}&statusId=TIMESHEET_COMPLETED"/> + <link target="${my}StatusToComplete"> + <parameter param-name="timesheetId" from-field="timesheet.timesheetId"/> + <parameter param-name="statusId" value="TIMESHEET_COMPLETED"/> + </link> </menu-item> </menu> <menu name="RequestSubTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml Mon Mar 30 06:49:26 2009 @@ -161,7 +161,6 @@ <set field="tabButtonItem" value="edittimesheet"/> <set field="labelTitleProperty" value="PageTitleAddTimesheet"/> <set field="my" value="My"/><!-- change link and target --> - <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy"/> </actions> <widgets> <decorator-screen name="CommonMyTimeDecorator" location="${parameters.mainDecoratorLocation}"> @@ -238,6 +237,9 @@ </screen> <screen name="CurrentTimesheet"> <section> + <actions> + <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy"/> + </actions> <widgets> <section> <condition> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml?rev=759853&r1=759852&r2=759853&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Mon Mar 30 06:49:26 2009 @@ -39,9 +39,7 @@ <entity-order-by field-name="phaseName"/> <entity-order-by field-name="workEffortName"/> </entity-options> - <sub-hyperlink target="taskView" description="[${result.taskId}]"> - <parameter param-name="workEffortId" from-field="result.taskId"/> - </sub-hyperlink> + <sub-hyperlink target="taskView?workEffortId=${workEffortId}" description="${bsh:workEffortId!=void&&!"Totals".equals(workEffortId)?workEffortId:""}"/> </drop-down> </field> <field name="checkComplete" title="${uiLabelMap.ProjectMgrCheckComplete}"><check/></field> |
Free forum by Nabble | Edit this page |