Author: hansbak
Date: Fri Dec 28 20:55:24 2007 New Revision: 607374 URL: http://svn.apache.org/viewvc?rev=607374&view=rev Log: reorganised timesheet option Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties?rev=607374&r1=607373&r2=607374&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties (original) +++ ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties Fri Dec 28 20:55:24 2007 @@ -55,7 +55,7 @@ PageTitleListProjectNotes=List Project Notes PageTitleListResources=Resources PageTitleListTaskNotes=List Task Notes -PageTitleMyTimesheets=My timesheet list +PageTitleTimesheets=Timesheet list PageTitleProjectBilling=Project Billing PageTitleProjectInformation=Project Information PageTitleRequestList=Request List Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh?rev=607374&r1=607373&r2=607374&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh Fri Dec 28 20:55:24 2007 @@ -31,25 +31,30 @@ import javolution.util.FastList; import javolution.util.FastMap; -timesheetId = parameters.get("timesheetId"); -userLogin = parameters.get("userLogin"); delegator = parameters.get("delegator"); locale = parameters.get("locale"); timeZone = parameters.get("timeZone"); +partyId = parameters.get("partyId"); +if (partyId == null) { + partyId = parameters.get("userLogin").getString("partyId"); +} + // show the requested timesheet, otherwise the current , if not exist create timesheet = null; +timesheetId = parameters.get("timesheetId"); if (timesheetId != null) { timesheet = delegator.findByPrimaryKey("Timesheet", UtilMisc.toMap("timesheetId", timesheetId)); + partyId = timesheet.getString("partyId"); // use the party from this timesheet } else { start = UtilDateTime.getWeekStart(UtilDateTime.nowTimestamp()); timesheets = delegator.findByAnd("Timesheet", - UtilMisc.toMap("partyId", userLogin.getString("partyId"), "fromDate", start)); + UtilMisc.toMap("partyId", partyId, "fromDate", start)); if (!UtilValidate.isEmpty(timesheets)) { timesheet = timesheets.get(0); } else { result = dispatcher.runSync("createTimesheetForThisWeek", - UtilMisc.toMap("userLogin", userLogin, "partyId", userLogin.getString("partyId"))); + UtilMisc.toMap("userLogin", userLogin, "partyId", partyId)); timesheet = delegator.findByPrimaryKey("Timesheet", UtilMisc.toMap("timesheetId", result.get("timesheetId"))); } } @@ -153,9 +158,9 @@ } context.put("timeEntries", entries); - +// get all timesheets of this user, including the planned hours timesheetsDb = delegator.findByAnd("Timesheet", - UtilMisc.toMap("partyId", userLogin.getString("partyId")), + UtilMisc.toMap("partyId", partyId), UtilMisc.toList("fromDate DESC")); timesheets = new LinkedList(); ts = timesheetsDb.iterator(); @@ -177,4 +182,9 @@ timesheets.add(timesheet); } context.put("timesheets", timesheets); + +// get the user names +context.put("partyNameView", delegator.findByPrimaryKey("PartyNameView", UtilMisc.toMap("partyId", partyId))); + + Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml?rev=607374&r1=607373&r2=607374&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Fri Dec 28 20:55:24 2007 @@ -368,6 +368,17 @@ <request-map uri="createWeeklyTimesheet"> <security https="true" auth="true"/> <event type="service" invoke="createTimesheetForThisWeek"/> + <response name="success" type="view" value="ShowTimesheet"/> + <response name="error" type="view" value="ShowTimesheet"/> + </request-map> + <request-map uri="addWeeklyTimesheet"> + <security https="true" auth="true"/> + <response name="success" type="view" value="addWeeklyTimesheet"/> + <response name="error" type="view" value="addWeeklyTimesheet"/> + </request-map> + <request-map uri="createMyWeeklyTimesheet"> + <security https="true" auth="true"/> + <event type="service" invoke="createTimesheetForThisWeek"/> <response name="success" type="view" value="MyTimesheets"/> <response name="error" type="view" value="MyTimesheets"/> </request-map> @@ -489,11 +500,34 @@ <event type="service" invoke="updateTimesheet"/> <response name="success" type="view" value="MyTimesheets"/> <response name="error" type="view" value="MyTimesheets"/> - </request-map> + </request-map> + <request-map uri="TimesheetToComplete"> + <security https="true" auth="true"/> + <event type="service" invoke="updateTimesheet"/> + <response name="success" type="view" value="ShowTimesheet"/> + <response name="error" type="view" value="ShowTimesheet"/> + </request-map> <request-map uri="FindTask"> <security https="true" auth="true"/> <response name="success" type="view" value="FindTask"/> </request-map> + <request-map uri="ShowTimesheet"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ShowTimesheet"/> + <response name="error" type="view" value="ShowTimesheet"/> + </request-map> + <request-map uri="TimeSheetStatustoComplete"> + <security https="true" auth="true"/> + <event type="service" invoke="updateTimesheet"/> + <response name="success" type="view" value="ShowTimesheet"/> + <response name="error" type="view" value="ShowTimesheet"/> + </request-map> + <request-map uri="TimeSheetStatustoProgress"> + <security https="true" auth="true"/> + <event type="service" invoke="updateTimesheetToInProcess"/> + <response name="success" type="view" value="ShowTimesheet"/> + <response name="error" type="view" value="ShowTimesheet"/> + </request-map> <!-- end of request mappings --> <!-- View Mappings --> @@ -527,6 +561,7 @@ <view-map name="EditTimeEntries" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditTimeEntries"/> <view-map name="FindTimeSheet" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#FindTimeSheet"/> <view-map name="EditTimeSheet" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#EditTimeSheet"/> + <view-map name="addWeeklyTimesheet" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#addWeeklyTimesheet"/> <view-map name="EditTimesheetEntries" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#EditTimeSheetEntries"/> <view-map name="EditTimesheetRoles" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#EditTimesheetRoles"/> <view-map name="MyTimesheets" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#MyTimesheets"/> @@ -535,5 +570,6 @@ <view-map name="EditWorkEffortNotes" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditProjectNotes"/> <view-map name="EditTaskNotes" type="screen" page="component://projectmgr/widget/TaskScreens.xml#EditTaskNotes"/> <view-map name="taskView" type="screen" page="component://projectmgr/widget/TaskScreens.xml#TaskView"/> + <view-map name="ShowTimesheet" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#ShowTimesheet"/> <!-- end of view mappings --> </site-conf> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml?rev=607374&r1=607373&r2=607374&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml Fri Dec 28 20:55:24 2007 @@ -222,7 +222,10 @@ <actions> <set field="headerItem" value="timesheet"/> <set field="timesheetId" from-field="parameters.timesheetId"/> - <entity-one entity-name="Timesheet" value-name="timesheet"/> + <entity-one entity-name="Timesheet" value-name="timesheet"/> + <entity-one entity-name="PartyNameView" value-name="partyName"> + <field-map field-name="partyId" env-name="timesheet.partyId"/> + </entity-one> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> @@ -232,14 +235,9 @@ <if-has-permission permission="WORKEFFORTMGR" action="_VIEW"/> </condition> <widgets> - <section> - <condition><not><if-empty field-name="timesheetId"/></not></condition> - <widgets> - <include-menu name="TimesheetTabBar" location="component://projectmgr/widget/Menus.xml"/> - <container><label style="head1">${uiLabelMap.TimesheetTimesheetId}: ${timesheetId}</label></container> - </widgets> - </section> - + <!--include-menu name="TimesheetTabBar" location="component://projectmgr/widget/Menus.xml"/--> + <include-menu name="TimesheetSubTabBar" location="component://projectmgr/widget/Menus.xml"/> + <container><label style="head1">${uiLabelMap.TimesheetTimesheetId}: ${timesheetId} ${uiLabelMap.CommonFrom}: ${partyName.firstName} ${partyName.middleName} ${partyName.lastName} ${partyName.groupName} [${timesheet.partyId}]</label></container> <decorator-section-include name="body"/> </widgets> <fail-widgets> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=607374&r1=607373&r2=607374&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Fri Dec 28 20:55:24 2007 @@ -27,7 +27,7 @@ <menu-item name="projects" title="${uiLabelMap.WorkEffortProjects}"><link target="FindProject"/></menu-item> <menu-item name="task" title="${uiLabelMap.ProjectMgrTasks}"><link target="FindTask"/></menu-item> <menu-item name="resources" title="${uiLabelMap.ProjectMgrResources}"><link target="FindResource"/></menu-item> - <menu-item name="timesheet" title="${uiLabelMap.Timesheet}"><link target="FindTimeSheet?findAll=N"/></menu-item> + <menu-item name="timesheet" title="${uiLabelMap.Timesheet}"><link target="FindTimeSheet"/></menu-item> <menu-item name="SkillType" title="${uiLabelMap.ProjectMgrSkillType}"><link target="findSkillTypes"/></menu-item> <!--menu-item name="calendar" title="${uiLabelMap.WorkEffortCalendar}"><link target="day"/></menu-item--> <menu-item name="request" title="${uiLabelMap.WorkEffortRequestList}"><link target="requestlist"/></menu-item> @@ -172,15 +172,35 @@ <link target="setTaskStatus?workEffortId=${workEffortId}&currentStatusId=PTS_CANCELLED"/> </menu-item> </menu> - <menu name="TimesheetTabBar" menu-container-style="button-bar tab-bar" default-menu-item-name="edittimesheet" default-selected-style="selected"> - <menu-item name="edittimesheet" title="${uiLabelMap.TimesheetTimsheetEdit}"> - <link target="EditTimeSheet?timesheetId=${timesheetId}"/> + <menu name="TimesheetTabBar" menu-container-style="button-bar tab-bar" default-selected-style="selected"> + <menu-item name="findtimesheet" title="${uiLabelMap.CommonFind}"> + <link target="FindTimeSheet"/> </menu-item> - <menu-item name="TimesheetRoles" title="${uiLabelMap.PartyParties}"> - <link target="EditTimesheetRoles?timesheetId=${timesheetId}"/> + <menu-item name="addTimesheet" title="${uiLabelMap.CommonAdd}"> + <link target="addWeeklyTimesheet"/> </menu-item> - <menu-item name="TimesheetEntries" title="${uiLabelMap.CommonEntries}"> - <link target="EditTimesheetEntries?timesheetId=${timesheetId}"/> + </menu> + <menu name="TimesheetSubTabBar" menu-container-style="button-bar button-style-2" default-menu-item-name="StatustoProgress"> + <menu-item name="addTimesheet" title="${uiLabelMap.CommonNew}"> + <link target="addWeeklyTimesheet"/> + </menu-item> + <menu-item name="TimeSheetStatustoComplete" title="${uiLabelMap.CommonStatustoComplete}"> + <condition> + <and> + <not><if-empty field-name="timesheet"/></not> + <if-compare field-name="timesheet.statusId" operator="equals" value="TIMESHEET_IN_PROCESS"/> + </and> + </condition> + <link target="TimeSheetStatustoComplete?timesheetId=${timesheet.timesheetId}&statusId=TIMESHEET_COMPLETED"/> + </menu-item> + <menu-item name="TimeSheetStatustoProgress" title="Set status to In Progress"> + <condition> + <and> + <not><if-empty field-name="timesheet"/></not> + <if-compare field-name="timesheet.statusId" operator="equals" value="TIMESHEET_COMPLETED"/> + </and> + </condition> + <link target="TimeSheetStatustoProgress?timesheetId=${timesheet.timesheetId}&statusId=TIMESHEET_IN_PROCESS"/> </menu-item> </menu> <menu name="MyTimeSubTabBar" menu-container-style="button-bar button-style-2" default-selected-style="selected"> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml?rev=607374&r1=607373&r2=607374&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml Fri Dec 28 20:55:24 2007 @@ -26,18 +26,24 @@ <set field="titleProperty" value="PageTitleFindTimeSheet"/> <set field="headerItem" value="timesheet"/> <set field="labelTitleProperty" value="ProjectMgrFindTimeSheet"/> - <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListTimeSheetByDateRange.bsh"/> </actions> <widgets> <decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <section> <widgets> - <platform-specific> - <html><html-template location="component://projectmgr/webapp/projectmgr/project/listTimeSheetByDateRange.ftl"/></html> - </platform-specific> - <container style="button-bar"><link target="EditTimeSheet" text="${uiLabelMap.TimesheetCreate}" style="buttontext"/></container> - <include-form name="ListFindTimeSheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">Find TimeSheet</label></container> + <container style="screenlet-body"> + <include-form name="FindTimeSheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </container> + </container> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">TimeSheet Listing</label></container> + <container style="screenlet-body"> + <include-form name="ListFindTimeSheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </container> + </container> </widgets> </section> </decorator-section> @@ -45,34 +51,107 @@ </widgets> </section> </screen> - <screen name="EditTimeSheet"> - <section> - <actions> - <set field="titleProperty" value="PageTitleFindTimesheet"/> - <set field="headerItem" value="timesheet"/> - <set field="tabButtonItem" value="edittimesheet"/> - <set field="labelTitleProperty" value="PageTitleAddTimesheet"/> - <entity-one entity-name="Timesheet" value-name="timesheet"/> - </actions> - <widgets> - <decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <section> - <widgets> - <container style="screenlet"> - <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditTimesheet} # ${timesheet.timesheetId}</label></container> - <container style="screenlet-body"> - <include-form name="EditTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/> - </container> - </container> - </widgets> - </section> - </decorator-section> - </decorator-screen> - </widgets> - </section> + <screen name="ShowTimesheet"> + <section> + <actions> + <set field="titleProperty" value="PageTitleFindTimeSheet"/> + <set field="headerItem" value="timesheet"/> + <set field="tabButtonItem" value="editTimesheet"/> + <set field="labelTitleProperty" value="ProjectMgrTimeSheetMyTime"/> + <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh"/> + </actions> + <widgets> + <decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditCurrentTimesheet} # ${timesheet.timesheetId} week: ${weekNumber}</label></container> + <container style="screenlet-body"> + <section> + <condition> + <if-compare field-name="timesheet.statusId" operator="equals" value="TIMESHEET_COMPLETED"/> + </condition> + <widgets> + <include-form name="WeekTimesheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </widgets> + <fail-widgets> + <include-form name="EditWeekTimesheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </fail-widgets> + </section> + </container> + </container> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleAddATimesheet}</label></container> + <container style="screenlet-body"> + <include-form name="AddWeeklyTimesheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </container> + </container> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleTimesheets} ${uiLabelMap.CommonOf} ${partyNameView.firstName} ${partyNameView.middleName} ${partyNameView.lastName} </label></container> + <container style="screenlet-body"> + <include-form name="ListTimeSheets" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </container> + </container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="EditTimeSheet"> + <section> + <actions> + <set field="titleProperty" value="PageTitleFindTimesheet"/> + <set field="headerItem" value="timesheet"/> + <set field="tabButtonItem" value="edittimesheet"/> + <set field="labelTitleProperty" value="PageTitleAddTimesheet"/> + <entity-one entity-name="Timesheet" value-name="timesheet"/> + </actions> + <widgets> + <decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <widgets> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditTimesheet} # ${timesheet.timesheetId}</label></container> + <container style="screenlet-body"> + <include-form name="EditTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/> + </container> + </container> + </widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> </screen> - + + <screen name="addWeeklyTimesheet"> + <section> + <actions> + <set field="titleProperty" value="PageTitleFindTimesheet"/> + <set field="headerItem" value="timesheet"/> + <set field="tabButtonItem" value="addtimesheet"/> + <set field="labelTitleProperty" value="PageTitleAddTimesheet"/> + <entity-one entity-name="Timesheet" value-name="timesheet"/> + </actions> + <widgets> + <decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <widgets> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleAddTimesheet}</label></container> + <container style="screenlet-body"> + <include-form name="AddWeeklyTimesheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </container> + </container> + </widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="MyTimesheets"> <section> <actions> @@ -103,11 +182,11 @@ <container style="screenlet"> <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleAddATimesheet}</label></container> <container style="screenlet-body"> - <include-form name="AddWeeklyTimesheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> - </container> + <include-form name="AddMyWeeklyTimesheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </container> </container> <container style="screenlet"> - <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleMyTimesheets} # ${timesheet.timesheetId}</label></container> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleMyTimesheets}</label></container> <container style="screenlet-body"> <include-form name="ListTimeSheets" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> </container> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=607374&r1=607373&r2=607374&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Fri Dec 28 20:55:24 2007 @@ -79,8 +79,8 @@ <service service-name="getPartyEmail" result-map-name="emailResult"/> <service service-name="getPartyTelephone" result-map-name="telResult"/> </row-actions> - <field name="resourceName" parameter-name="partyId" title="${uiLabelMap.ProjectMgrResourceName}" widget-style="buttontext"> - <hyperlink also-hidden="false" description="${personalTitle} ${lastName},${firstName} ${middleName} ${groupName}" target="viewprofile?partyId=${partyId}"/> + <field name="resourceName" parameter-name="partyId" title="${uiLabelMap.ProjectMgrResourceName}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${personalTitle} ${lastName},${firstName} ${middleName} ${groupName}" target="viewprofile?partyId=${partyId}"/> </field> <field name="roleTypeId"><hidden/></field> <field name="emailAddess"><hyperlink target="/partymgr/control/EditCommunicationEvent?partyIdFrom=${userLogin.partyId}&partyIdTo=${partyId}&communicationEventTypeId=EMAIL_COMMUNICATION&contactMechIdTo=${contactMechId}&contactMechTypeId=EMAIL_ADDRESS" description="${emailResult.emailAddress}" target-type="inter-app"/></field> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml?rev=607374&r1=607373&r2=607374&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Fri Dec 28 20:55:24 2007 @@ -24,13 +24,14 @@ <field name="timesheetId"><hidden/></field> <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}"> <drop-down allow-empty="true"> - <entity-options entity-name="ProjectAndPhaseAndTask" description="${workEffortName} -- ${phaseName} -- ${projectName}"> - <entity-constraint name="workEffortTypeId" operator="not-equals" value="TASK_TEMPLATE"/> + <entity-options entity-name="ProjectPartyAndPhaseAndTask" description="${workEffortName} -- ${phaseName} -- ${projectName}"> + <entity-constraint name="workEffortTypeId" operator="not-equals" value="TASK_TEMPLATE"/> + <entity-constraint name="partyId" env-name="timesheet.partyId"/> <entity-order-by field-name="projectName"/> <entity-order-by field-name="phaseName"/> <entity-order-by field-name="workEffortName"/> </entity-options> - <sub-hyperlink target="taskView?workEffortId=${workEffortId}" link-style="buttontext" description="${workEffortId}"/> + <sub-hyperlink target="taskView?workEffortId=${workEffortId}" link-style="buttontext" description="${bsh:workEffortId!="Totals"?workEffortId:void}"/> </drop-down> </field> <field name="0" parameter-name="hoursDay0" title="Sun"><text size="5"/></field> @@ -55,29 +56,78 @@ <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display type="date"/></field> <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display type="date"/></field> <field name="hours"><display/></field> - <field name="comments" title="${uiLabelMap.CommonComments}"><display/></field> - </form> - <form name="ListFindTimeSheet" type="list" list-name="timeSheetList" paginate-target="FindTimeSheet"> + <field name="comments" title="${uiLabelMap.CommonComments}"><display/></field> + <field name="completeLink" title="${uiLabelMap.CommonStatustoComplete}" widget-style="buttontext"> + <hyperlink target="TimesheetToComplete?timesheetId=${timesheetId}&statusId=TIMESHEET_COMPLETED" + description="${uiLabelMap.CommonStatustoComplete}" also-hidden="false"/> + </field> + </form> + <form name="FindTimeSheet" target="FindTimeSheet" title="" type="single"> + <field name="noConditionFind"><hidden value="Y"/></field> + <field name="newTimesheetId" parameter-name="timesheetId"><text-find default-option="contains" ignore-case="true"/></field> + <field name="comments"><text-find default-option="contains" ignore-case="true"/></field> + <field name="partyId" title="${uiLabelMap.PartyParty}"> + <drop-down allow-empty="true"> + <entity-options entity-name="PartyRoleAndPartyDetail" description="${firstName} ${lastName}"> + <entity-constraint name="roleTypeId" value="PROJECT_TEAM"/> + <entity-order-by field-name="lastName"/> + <entity-order-by field-name="groupName"/> + </entity-options> + </drop-down> + </field> + <field name="statusId" title="${uiLabelMap.CommonStatus}" position="1"> + <drop-down allow-empty="true"> + <entity-options entity-name="StatusItem" key-field-name="statusId" description="${description}"> + <entity-constraint name="statusTypeId" value="TIMESHEET_STATUS"/> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="fromDate"><date-find /></field> + <field name="${uiLabelMap.CommonFind}" title="${uiLabelMap.CommonFind}"><submit/></field> + </form> + <form name="ListFindTimeSheet" type="list" list-name="listIt" paginate-target="FindTimeSheet"> + <actions> + <service service-name="performFind" result-map-name="result" result-map-list-name="listIt"> + <field-map field-name="inputFields" env-name="parameters"/> + <field-map field-name="entityName" value="Timesheet"/> + <field-map field-name="orderBy" value="fromDate DESC"/> + </service> + </actions> <field name="timesheetId" title="${uiLabelMap.TimesheetTimesheetId}" widget-style="buttontext"> - <hyperlink also-hidden="false" description="${timesheetId}" target="EditTimeSheet?timesheetId=${timesheetId}"/> + <hyperlink also-hidden="false" description="${timesheetId}" target="ShowTimesheet?timesheetId=${timesheetId}"/> </field> - <field name="partyId" title="${uiLabelMap.PartyParty}"><display/></field> - <field name="clientPartyId" title="${uiLabelMap.FormFieldTitle_clientPartyId}"><display/></field> - <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field> - <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display/></field> + <field name="partyId" title="${uiLabelMap.PartyParty}"><display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}"/></field> + <field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" description="${description}"/></field> + <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display type="date"/></field> + <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display type="date"/></field> <field name="comments" title="${uiLabelMap.CommonComments}"><display/></field> - <field name="deleteLink" title="${uiLabelMap.CommonDelete}" widget-style="buttontext"> - <hyperlink target="deleteTimeSheet?timesheetId=${timesheetId}&findAll=Y" - description="${uiLabelMap.CommonDelete}" also-hidden="false"/> - </field> + <field name="completeLink" title="${uiLabelMap.CommonStatustoComplete}" widget-style="buttontext"> + <hyperlink target="TimesheetToComplete?timesheetId=${timesheetId}&statusId=TIMESHEET_COMPLETED" + description="${uiLabelMap.CommonStatustoComplete}" also-hidden="false"/> + </field> </form> - <form name="AddWeeklyTimesheet" type="single" target="createWeeklyTimesheet" title=""> + <form name="AddMyWeeklyTimesheet" type="single" target="createMyWeeklyTimesheet" title=""> <field name="partyId"><hidden value="${userLogin.partyId}"/></field> <field entry-name="dummy" name="requiredDate"><date-time type="date"/></field> <field name="addButton"><submit/></field> </form> - + + <form name="AddWeeklyTimesheet" type="single" target="createWeeklyTimesheet" title=""> + <field name="partyId" title="${uiLabelMap.PartyParty}"> + <drop-down allow-empty="true"> + <entity-options entity-name="PartyRoleAndPartyDetail" description="${firstName} ${lastName}"> + <entity-constraint name="roleTypeId" value="PROJECT_TEAM"/> + <entity-order-by field-name="lastName"/> + <entity-order-by field-name="groupName"/> + </entity-options> + </drop-down> + </field> + <field entry-name="dummy" name="requiredDate"><date-time type="date"/></field> + <field name="addButton"><submit/></field> + </form> + <form name="AddTimesheetEntry" type="single" target="createTimesheetEntry" title=""> <auto-fields-service service-name="createTimeEntry"/> |
Free forum by Nabble | Edit this page |