calEntry = FastMap.newInstance();
diff --git a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy
new file mode 100644
index 0000000000..d0da6587f7
--- /dev/null
+++ b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+facilityId = parameters.facilityId;
+fixedAssetId = parameters.fixedAssetId;
+partyId = parameters.partyId;
+workEffortTypeId = parameters.workEffortTypeId;
+
+urlParam = null;
+if (facilityId) {
+ urlParam = "facilityId=" + facilityId;
+}
+if (fixedAssetId) {
+ urlParam = "fixedAssetId=" + fixedAssetId;
+}
+if (partyId) {
+ urlParam = "partyId=" + partyId;
+}
+
+if (workEffortTypeId) {
+ urlParam = "workEffortTypeId=" + workEffortTypeId;
+}
+
+if (urlParam) {
+ urlParam = "&" + urlParam;
+}
+
+context.put("urlParam", urlParam);
diff --git a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy
index 293dcfa895..6ff3488dd5 100644
--- a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy
+++ b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy
@@ -27,25 +27,11 @@ import java.sql.Timestamp;
String currentDay = parameters.get("currentDay");
String startParam = parameters.get("start");
-facilityId = parameters.get("facilityId");
-fixedAssetId = parameters.get("fixedAssetId");
-partyId = parameters.get("partyId");
-workEffortTypeId = parameters.get("workEffortTypeId");
-
-eventsParam = "";
-if (facilityId != null) {
- eventsParam = "facilityId=" + facilityId;
-}
-if (fixedAssetId != null) {
- eventsParam = "fixedAssetId=" + fixedAssetId;
-}
-if (partyId != null) {
- eventsParam = "partyId=" + partyId;
-}
-
-if (workEffortTypeId != null) {
- eventsParam = "workEffortTypeId=" + workEffortTypeId;
-}
+facilityId = parameters.facilityId;
+fixedAssetId = parameters.fixedAssetId;
+partyId = parameters.partyId;
+workEffortTypeId = parameters.workEffortTypeId;
+entityExprList = context.entityExprList;
Timestamp start = null;
if (UtilValidate.isNotEmpty(startParam)) {
@@ -64,6 +50,9 @@ context.nextMillis = new Long(next.getTime()).toString();
Map serviceCtx = UtilMisc.toMap("userLogin", userLogin,"start",start,"numPeriods",new Integer(24),"periodType",new Integer(Calendar.HOUR));
serviceCtx.putAll(UtilMisc.toMap("partyId", partyId, "facilityId", facilityId, "fixedAssetId", fixedAssetId, "workEffortTypeId", workEffortTypeId, "locale", locale, "timeZone", timeZone));
+if (entityExprList) {
+ serviceCtx.putAll(["entityExprList" : entityExprList]);
+}
Map result = dispatcher.runSync("getWorkEffortEventsByPeriod",serviceCtx);
context.put("periods",result.get("periods"));
@@ -71,4 +60,3 @@ context.put("maxConcurrentEntries",result.get("maxConcurrentEntries"));
context.put("start",start);
context.put("prev",prev);
context.put("next",next);
-context.put("eventsParam", eventsParam);
diff --git a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy
index 139ffbf6a3..53424640b6 100644
--- a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy
+++ b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy
@@ -26,27 +26,13 @@ import org.ofbiz.base.util.*;
import org.ofbiz.webapp.pseudotag.*;
import org.ofbiz.workeffort.workeffort.*;
-startParam = parameters.get("start");
+startParam = parameters.start;
-facilityId = parameters.get("facilityId");
-fixedAssetId = parameters.get("fixedAssetId");
-partyId = parameters.get("partyId");
-workEffortTypeId = parameters.get("workEffortTypeId");
-
-eventsParam = "";
-if (facilityId != null) {
- eventsParam = "facilityId=" + facilityId;
-}
-if (fixedAssetId != null) {
- eventsParam = "fixedAssetId=" + fixedAssetId;
-}
-if (partyId != null) {
- eventsParam = "partyId=" + partyId;
-}
-
-if (workEffortTypeId != null) {
- eventsParam = "workEffortTypeId=" + workEffortTypeId;
-}
+facilityId = parameters.facilityId;
+fixedAssetId = parameters.fixedAssetId;
+partyId = parameters.partyId;
+workEffortTypeId = parameters.workEffortTypeId;
+entityExprList = context.entityExprList;
start = null;
if (UtilValidate.isNotEmpty(startParam)) {
@@ -79,6 +65,9 @@ context.put("firstWeekNum", new Integer(firstWeekNum));
serviceCtx = UtilMisc.toMap("userLogin", userLogin, "start", getFrom,"numPeriods", new Integer(numDays), "periodType", new Integer(Calendar.DATE));
serviceCtx.putAll(UtilMisc.toMap("partyId", partyId, "facilityId", facilityId, "fixedAssetId", fixedAssetId, "workEffortTypeId", workEffortTypeId, "locale", locale, "timeZone", timeZone));
+if (entityExprList) {
+ serviceCtx.putAll(["entityExprList" : entityExprList]);
+}
result = dispatcher.runSync("getWorkEffortEventsByPeriod", serviceCtx);
@@ -88,4 +77,3 @@ context.put("start", start);
context.put("end", end);
context.put("prev", prev);
context.put("next", next);
-context.put("eventsParam", eventsParam);
diff --git a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy
index 1d1b6fee64..d47debef35 100644
--- a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy
+++ b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy
@@ -25,26 +25,17 @@ import org.ofbiz.webapp.pseudotag.*;
import org.ofbiz.workeffort.workeffort.*;
import java.sql.Timestamp;
-String currentDay = parameters.get("currentDay");
-String startParam = parameters.get("start");
+String currentDay = parameters.currentDay;
+String startParam = parameters.start;
-facilityId = parameters.get("facilityId");
-fixedAssetId = parameters.get("fixedAssetId");
-partyId = parameters.get("partyId");
-workEffortTypeId = parameters.get("workEffortTypeId");
-
-eventsParam = "";
-if (facilityId != null) {
- eventsParam = "facilityId=" + facilityId;
-}
-if (fixedAssetId != null) {
- eventsParam = "fixedAssetId=" + fixedAssetId;
-}
-if (partyId != null) {
- eventsParam = "partyId=" + partyId;
-}
-if (workEffortTypeId != null) {
- eventsParam = "workEffortTypeId=" + workEffortTypeId;
+facilityId = parameters.facilityId;
+fixedAssetId = parameters.fixedAssetId;
+partyId = parameters.partyId;
+workEffortTypeId = parameters.workEffortTypeId;
+entityExprList = (List) context.get("entityExprList");
+filterOutCanceledEvents = parameters.filterOutCanceledEvents;
+if (!filterOutCanceledEvents) {
+ filterOutCanceledEvents = Boolean.FALSE;
}
Timestamp start = null;
@@ -64,8 +55,14 @@ Timestamp next = UtilDateTime.getDayStart(start, 7, timeZone, locale);
context.nextMillis = new Long(next.getTime()).toString();
Timestamp end = UtilDateTime.getDayStart(start, 6, timeZone, locale);
-Map serviceCtx = UtilMisc.toMap("userLogin", userLogin,"start",start,"numPeriods",new Integer(7),"periodType",new Integer(Calendar.DATE));
-serviceCtx.putAll(UtilMisc.toMap("partyId", partyId, "facilityId", facilityId, "fixedAssetId", fixedAssetId, "workEffortTypeId", workEffortTypeId, "locale", locale, "timeZone", timeZone));
+Map serviceCtx = UtilMisc.toMap("userLogin", userLogin,"start",start,"numPeriods",new Integer(7),
+ "periodType",new Integer(Calendar.DATE));
+serviceCtx.putAll(UtilMisc.toMap("partyId", partyId, "facilityId", facilityId,
+ "fixedAssetId", fixedAssetId, "workEffortTypeId", workEffortTypeId,
+ "locale", locale, "timeZone", timeZone));
+if (entityExprList) {
+ serviceCtx.putAll(["entityExprList" : entityExprList]);
+}
Map result = dispatcher.runSync("getWorkEffortEventsByPeriod",serviceCtx);
context.put("periods",result.get("periods"));
@@ -74,4 +71,3 @@ context.put("start",start);
context.put("end",end);
context.put("prev",prev);
context.put("next",next);
-context.put("eventsParam", eventsParam);
diff --git a/applications/workeffort/webapp/workeffort/calendar/day.ftl b/applications/workeffort/webapp/workeffort/calendar/day.ftl
index a3205dca60..a48bdb0831 100644
--- a/applications/workeffort/webapp/workeffort/calendar/day.ftl
+++ b/applications/workeffort/webapp/workeffort/calendar/day.ftl
@@ -33,7 +33,7 @@ under the License.
class="current-period"<#else><#if (period.calendarEntries?size > 0)> class="active-period"#if>#if>>
${period.start?time?string.short}
- ">${uiLabelMap.CommonAddNew}
+ ">${uiLabelMap.CommonAddNew}
|
<#list period.calendarEntries as calEntry>
<#if calEntry.workEffort.actualStartDate?exists>
@@ -66,7 +66,7 @@ under the License.
<#else>
${startDate?time?string.short}-${completionDate?time?string.short}
#if>
-
${calEntry.workEffort.workEffortName?default("Undefined")}
+
${calEntry.workEffort.workEffortName?default("Undefined")}
#if>
#list>
<#if (period.calendarEntries?size < maxConcurrentEntries)>
diff --git a/applications/workeffort/webapp/workeffort/calendar/month.ftl b/applications/workeffort/webapp/workeffort/calendar/month.ftl
index 9825aa51bb..5bb6b34365 100644
--- a/applications/workeffort/webapp/workeffort/calendar/month.ftl
+++ b/applications/workeffort/webapp/workeffort/calendar/month.ftl
@@ -44,12 +44,12 @@ height: auto;
<#if indexMod7 = 0>
|
- ${uiLabelMap.CommonWeek} ${period.start?date?string("w")}
+ ${uiLabelMap.CommonWeek} ${period.start?date?string("w")}
|
#if>
class="current-period"<#else><#if (period.calendarEntries?size > 0)> class="active-period"#if>#if>>
- ${period.start?date?string("d")?cap_first}
- ${uiLabelMap.CommonAddNew}
+ ${period.start?date?string("d")?cap_first}
+ ${uiLabelMap.CommonAddNew}
<#list period.calendarEntries as calEntry>
<#if calEntry.workEffort.actualStartDate?exists>
@@ -81,7 +81,7 @@ height: auto;
${startDate?time?string.short}-${completionDate?time?string.short}
#if>
- ${calEntry.workEffort.workEffortName?default("Undefined")} ${calEntry.eventStatus?default(" ")}
+ ${calEntry.workEffort.workEffortName?default("Undefined")} ${calEntry.eventStatus?default(" ")}
#list>
|
diff --git a/applications/workeffort/webapp/workeffort/calendar/week.ftl b/applications/workeffort/webapp/workeffort/calendar/week.ftl
index fa49f2df32..924f19a847 100644
--- a/applications/workeffort/webapp/workeffort/calendar/week.ftl
+++ b/applications/workeffort/webapp/workeffort/calendar/week.ftl
@@ -32,8 +32,8 @@ under the License.
<#if (nowTimestamp >= period.start) && (nowTimestamp <= period.end)><#assign currentPeriod = true/>#if>
class="current-period"<#else><#if (period.calendarEntries?size > 0)> class="active-period"#if>#if>>
- &${eventsParam}#if>${addlParam?if_exists}@ofbizUrl>">${period.start?date?string("EEEE")?cap_first} ${period.start?date?string.short}
- ">${uiLabelMap.CommonAddNew}
+ ">${period.start?date?string("EEEE")?cap_first} ${period.start?date?string.short}
+ ">${uiLabelMap.CommonAddNew}
|
<#list period.calendarEntries as calEntry>
<#if calEntry.workEffort.actualStartDate?exists>
@@ -68,7 +68,7 @@ under the License.
<#else>
${startDate?time?string.short}-${completionDate?time?string.short}
#if>
-
${calEntry.workEffort.workEffortName?default("Undefined")}
+
${calEntry.workEffort.workEffortName?default("Undefined")}
#if>
#list>
<#if (period.calendarEntries?size < maxConcurrentEntries)>
diff --git a/applications/workeffort/widget/CalendarForms.xml b/applications/workeffort/widget/CalendarForms.xml
index 659bb93aea..54bf688486 100644
--- a/applications/workeffort/widget/CalendarForms.xml
+++ b/applications/workeffort/widget/CalendarForms.xml
@@ -29,14 +29,12 @@ under the License.
-