| <?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. |
| --> |
| |
| <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-screen.xsd"> |
| <screen name="MyTimesheets"> |
| <section> |
| <actions> |
| <set field="headerItem" value="mytime"/> |
| <set field="titleProperty" value="WorkEffortMyTimesheets"/> |
| |
| <set field="queryString" from-field="result.queryString"/> |
| <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/> |
| <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/> |
| <entity-condition entity-name="Timesheet" list-name="currentTimesheetList"> |
| <condition-list combine="and"> |
| <condition-expr field-name="partyId" env-name="userLogin.partyId"/> |
| <condition-expr field-name="fromDate" operator="less-equals" env-name="nowTimestamp"/> |
| <condition-list combine="or"> |
| <condition-expr field-name="thruDate" operator="greater-equals" env-name="nowTimestamp"/> |
| <condition-expr field-name="thruDate" env-name="null"/> |
| </condition-list> |
| </condition-list> |
| </entity-condition> |
| </actions> |
| <widgets> |
| <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> |
| <decorator-section name="body"> |
| <container><label text="${uiLabelMap.WorkEffortMyCurrentTimesheets}" style="head2"/></container> |
| <container> |
| <link text="${uiLabelMap.PageTitleCreateWeekTimesheet}" target="createTimesheetForThisWeek?partyId=${userLogin.partyId}" style="buttontext"/> |
| <link text="${uiLabelMap.TimesheetCreate}" target="EditTimesheet?partyId=${userLogin.partyId}" style="buttontext"/> |
| </container> |
| <iterate-section entry-name="currentTimesheet" list-name="currentTimesheetList"> |
| <section> |
| <actions> |
| <entity-condition entity-name="TimeEntry" list-name="currentTimeEntryList"> |
| <condition-list combine="and"> |
| <condition-expr field-name="partyId" env-name="userLogin.partyId"/> |
| <condition-expr field-name="timesheetId" env-name="currentTimesheet.timesheetId"/> |
| </condition-list> |
| </entity-condition> |
| </actions> |
| <widgets> |
| <container> |
| <label style="tableheadtext" text="${uiLabelMap.Timesheet}: ${currentTimesheet.fromDate} ${uiLabelMap.CommonThru} ${currentTimesheet.thruDate} ${currentTimesheet.comments}"/> |
| <link target="EditTimesheet?timesheetId=${currentTimesheet.timesheetId}" text="${currentTimesheet.timesheetId}" style="buttontext"></link> |
| </container> |
| <iterate-section entry-name="currentTimeEntry" list-name="currentTimeEntryList"> |
| <section> |
| <actions> |
| <entity-one entity-name="RateType" value-name="currentRateType" auto-field-map="false"> |
| <field-map field-name="rateTypeId" env-name="currentTimeEntry.rateTypeId"/> |
| </entity-one> |
| </actions> |
| <widgets> |
| <container> |
| <label style="tabletext" text="${uiLabelMap.TimesheetTimeEntry} ${uiLabelMap.CommonFor} ${currentTimeEntry.fromDate} "/> |
| <label style="tableheadtext" text="${currentTimeEntry.hours} ${uiLabelMap.TimesheetHours} "/> |
| <label style="tabletext" text="${currentTimeEntry.comments} [${currentRateType.description}]"/> |
| <section> |
| <condition><not><if-empty field-name="currentTimeEntry.workEffortId"/></not></condition> |
| <widgets><link target="WorkEffortSummary?workEffortId=${currentTimeEntry.workEffortId}" text="${uiLabelMap.WorkEffortWorkEffort}: ${currentTimeEntry.workEffortId}" style="linktext"/></widgets> |
| </section> |
| </container> |
| </widgets> |
| </section> |
| </iterate-section> |
| <section> |
| <condition><if-compare-field field-name="parameters.showQuickEntry" operator="equals" to-field-name="currentTimesheet.timesheetId"/></condition> |
| <widgets> |
| <include-form name="QuickCreateTimeEntry" location="component://workeffort/widget/TimesheetForms.xml"/> |
| </widgets> |
| <fail-widgets> |
| <container> |
| <link target="MyTimesheets?showQuickEntry=${currentTimesheet.timesheetId}" text="${uiLabelMap.TimesheetQuickTimeEntry}" style="buttontext"></link> |
| <link target="EditTimesheetEntries?timesheetId=${currentTimesheet.timesheetId}" text="${uiLabelMap.TimesheetTimeEntries}" style="buttontext"></link> |
| </container> |
| </fail-widgets> |
| </section> |
| </widgets> |
| </section> |
| </iterate-section> |
| |
| <!-- createQuickTimeEntry --> |
| |
| <container><label text="${uiLabelMap.WorkEffortMyRates}" style="head2"/></container> |
| <include-form name="ListMyRates" location="component://workeffort/widget/TimesheetForms.xml"/> |
| <container><label text="${uiLabelMap.WorkEffortMyTimesheets}" style="head2"/></container> |
| <include-form name="ListMyTimesheets" location="component://workeffort/widget/TimesheetForms.xml"/> |
| </decorator-section> |
| </decorator-screen> |
| </widgets> |
| </section> |
| </screen> |
| <screen name="FindTimesheet"> |
| <section> |
| <actions> |
| <set field="titleProperty" value="PageTitleFindTimesheet"/> |
| <set field="tabButtonItem" value="Timesheet"/> |
| <set field="labelTitleProperty" value="PageTitleFindTimesheet"/> |
| |
| <set field="timesheetId" from-field="parameters.timesheetId"/> |
| </actions> |
| <widgets> |
| <decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}"> |
| <decorator-section name="body"> |
| <section> |
| <condition> |
| <if-has-permission permission="WORKEFFORTMGR" action="_VIEW"/> |
| </condition> |
| <widgets> |
| <container><label style="head1">${uiLabelMap.PageTitleFindTimesheet}</label></container> |
| <container><link text="${uiLabelMap.TimesheetCreate}" target="EditTimesheet" style="linktext"/></container> |
| <include-form name="FindTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/> |
| <include-form name="ListFindTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/> |
| </widgets> |
| <fail-widgets> |
| <label style="head3">${uiLabelMap.WorkEffortViewPermissionError}</label> |
| </fail-widgets> |
| </section> |
| </decorator-section> |
| </decorator-screen> |
| </widgets> |
| </section> |
| </screen> |
| <screen name="EditTimesheet"> |
| <section> |
| <actions> |
| <set field="titleProperty" value="PageTitleEditTimesheet"/> |
| <set field="tabButtonItem" value="Timesheet"/> |
| <set field="labelTitleProperty" value="PageTitleEditTimesheet"/> |
| |
| <set field="timesheetId" from-field="parameters.timesheetId"/> |
| <entity-one entity-name="Timesheet" value-name="timesheet"/> |
| </actions> |
| <widgets> |
| <decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}"> |
| <decorator-section name="body"> |
| <section> |
| <condition> |
| <if-empty field-name="timesheet"/> |
| </condition> |
| <widgets> |
| <label style="head1">${uiLabelMap.PageTitleAddTimesheet}</label> |
| <include-form name="EditTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/> |
| </widgets> |
| <fail-widgets> |
| <container><label style="head1">${uiLabelMap.PageTitleEditTimesheet}</label></container> |
| <container><link text="${uiLabelMap.TimesheetCreate}" target="EditTimesheet" style="linktext"/></container> |
| <include-form name="EditTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/> |
| <include-form name="DisplayTimesheetEntries" location="component://workeffort/widget/TimesheetForms.xml"/> |
| <include-form name="AddTimesheetToInvoice" location="component://workeffort/widget/TimesheetForms.xml"/> |
| <include-form name="AddTimesheetToNewInvoice" location="component://workeffort/widget/TimesheetForms.xml"/> |
| </fail-widgets> |
| </section> |
| </decorator-section> |
| </decorator-screen> |
| </widgets> |
| </section> |
| </screen> |
| <screen name="EditTimesheetRoles"> |
| <section> |
| <actions> |
| <set field="titleProperty" value="PageTitleEditTimesheetRoles"/> |
| <set field="tabButtonItem" value="TimesheetRoles"/> |
| <set field="labelTitleProperty" value="PageTitleEditTimesheetRoles"/> |
| |
| <set field="timesheetId" from-field="parameters.timesheetId"/> |
| <entity-one entity-name="Timesheet" value-name="timesheet"/> |
| </actions> |
| <widgets> |
| <decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}"> |
| <decorator-section name="body"> |
| <container><label style="head1">${uiLabelMap.PageTitleEditTimesheetRoles}</label></container> |
| <container><link text="${uiLabelMap.TimesheetCreate}" target="EditTimesheet" style="linktext"/></container> |
| <include-form name="ListTimesheetRoles" location="component://workeffort/widget/TimesheetForms.xml"/> |
| <include-form name="AddTimesheetRole" location="component://workeffort/widget/TimesheetForms.xml"/> |
| </decorator-section> |
| </decorator-screen> |
| </widgets> |
| </section> |
| </screen> |
| <screen name="EditTimesheetEntries"> |
| <section> |
| <actions> |
| <set field="titleProperty" value="PageTitleEditTimesheetEntries"/> |
| <set field="tabButtonItem" value="TimesheetEntries"/> |
| <set field="labelTitleProperty" value="PageTitleEditTimesheetEntries"/> |
| |
| <set field="timesheetId" from-field="parameters.timesheetId"/> |
| <entity-one entity-name="Timesheet" value-name="timesheet"/> |
| </actions> |
| <widgets> |
| <decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}"> |
| <decorator-section name="body"> |
| <container><label style="head1">${uiLabelMap.PageTitleEditTimesheetEntries}</label></container> |
| <container><link text="${uiLabelMap.TimesheetCreate}" target="EditTimesheet" style="linktext"/></container> |
| <include-form name="ListTimesheetEntries" location="component://workeffort/widget/TimesheetForms.xml"/> |
| <include-form name="AddTimesheetEntry" location="component://workeffort/widget/TimesheetForms.xml"/> |
| </decorator-section> |
| </decorator-screen> |
| </widgets> |
| </section> |
| </screen> |
| </screens> |