TimesheetScreens.xml
17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<?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://ofbiz.apache.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"/>
<property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/>
<set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>
<entity-condition entity-name="Timesheet" list="currentTimesheetList">
<condition-list combine="and">
<condition-expr field-name="partyId" from-field="userLogin.partyId"/>
<condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/>
<condition-list combine="or">
<condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/>
<condition-expr field-name="thruDate" from-field="null"/>
</condition-list>
</condition-list>
</entity-condition>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.WorkEffortMyCurrentTimesheets}">
<container style="button-bar">
<link text="${uiLabelMap.PageTitleCreateWeekTimesheet}" target="createTimesheetForThisWeek" style="buttontext">
<parameter param-name="partyId" from-field="userLogin.partyId"/>
</link>
<link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext">
<parameter param-name="partyId" from-field="userLogin.partyId"/>
</link>
</container>
<iterate-section entry="currentTimesheet" list="currentTimesheetList">
<section>
<actions>
<entity-condition entity-name="TimeEntry" list="currentTimeEntryList">
<condition-list combine="and">
<condition-expr field-name="partyId" from-field="userLogin.partyId"/>
<condition-expr field-name="timesheetId" from-field="currentTimesheet.timesheetId"/>
</condition-list>
</entity-condition>
</actions>
<widgets>
<container>
<label style="tableheadtext" text="${uiLabelMap.WorkEffortTimesheet}: ${currentTimesheet.fromDate} ${uiLabelMap.CommonThru} ${currentTimesheet.thruDate} ${currentTimesheet.comments}"/>
<link target="EditTimesheet" text="${currentTimesheet.timesheetId}" style="buttontext">
<parameter param-name="timesheetId" from-field="currentTimesheet.timesheetId"/>
</link>
</container>
<iterate-section entry="currentTimeEntry" list="currentTimeEntryList">
<section>
<actions>
<entity-one entity-name="RateType" value-field="currentRateType" auto-field-map="false">
<field-map field-name="rateTypeId" from-field="currentTimeEntry.rateTypeId"/>
</entity-one>
</actions>
<widgets>
<container>
<label text="${uiLabelMap.WorkEffortTimesheetTimeEntry} ${uiLabelMap.CommonFor} ${currentTimeEntry.fromDate} "/>
<label style="tableheadtext" text="${currentTimeEntry.hours} ${uiLabelMap.WorkEffortTimesheetHours} "/>
<label text="${currentTimeEntry.comments} [${currentRateType.description}]"/>
<section>
<condition><not><if-empty field="currentTimeEntry.workEffortId"/></not></condition>
<widgets>
<link target="WorkEffortSummary" text="${uiLabelMap.WorkEffortWorkEffort}: ${currentTimeEntry.workEffortId}" style="buttontext">
<parameter param-name="workEffortId" from-field="currentTimeEntry.workEffortId"/>
</link>
</widgets>
</section>
</container>
</widgets>
</section>
</iterate-section>
<section>
<condition><if-compare-field field="parameters.showQuickEntry" operator="equals" to-field="currentTimesheet.timesheetId"/></condition>
<widgets>
<include-form name="QuickCreateTimeEntry" location="component://workeffort/widget/TimesheetForms.xml"/>
</widgets>
<fail-widgets>
<container>
<link target="MyTimesheets" text="${uiLabelMap.WorkEffortTimesheetQuickTimeEntry}" style="buttontext">
<parameter param-name="showQuickEntry" from-field="currentTimesheet.timesheetId"/>
</link>
<link target="EditTimesheetEntries" text="${uiLabelMap.WorkEffortTimesheetTimeEntries}" style="buttontext">
<parameter param-name="timesheetId" from-field="currentTimesheet.timesheetId"/>
</link>
</container>
</fail-widgets>
</section>
</widgets>
</section>
</iterate-section>
</screenlet>
<!-- createQuickTimeEntry -->
<screenlet title="${uiLabelMap.WorkEffortMyRates}">
<include-form name="ListMyRates" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.WorkEffortMyTimesheets}">
<include-form name="ListMyTimesheets" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
</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>
<screenlet title="${uiLabelMap.PageTitleFindTimesheet}">
<container style="button-bar">
<link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext create"/>
</container>
<include-form name="FindTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleFindTimesheet}">
<include-form name="ListFindTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
</widgets>
<fail-widgets>
<label style="h3">${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-field="timesheet"/>
</actions>
<widgets>
<decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
<if-empty field="timesheet"/>
</condition>
<widgets>
<screenlet title="${uiLabelMap.PageTitleAddTimesheet}">
<include-form name="EditTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
</widgets>
<fail-widgets>
<screenlet title="${uiLabelMap.PageTitleEditTimesheet}">
<container style="button-bar">
<link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext create"/>
</container>
<include-form name="EditTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleAddTimesheetToInvoice}">
<include-form name="AddTimesheetToInvoice" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleDisplayTimesheetEntries}">
<container><link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext"/></container>
<include-form name="DisplayTimesheetEntries" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleAddTimesheetToNewInvoice}">
<include-form name="AddTimesheetToNewInvoice" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
</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-field="timesheet"/>
</actions>
<widgets>
<decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleEditTimesheetRoles}">
<container style="button-bar">
<link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext create"/>
</container>
<include-form name="ListTimesheetRoles" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleAddTimesheetRoles}">
<include-form name="AddTimesheetRole" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
</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-field="timesheet"/>
</actions>
<widgets>
<decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleEditTimesheetEntries}">
<container><link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext"/></container>
<include-form name="ListTimesheetEntries" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleAddTimesheetEntries}">
<include-form name="AddTimesheetEntry" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>