blob: 2f7e6f2c0447062ff06b16687f0d7bab13b3ed50 [file] [log] [blame]
<?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="Calendar">
<section>
<actions>
<script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
<set field="parameters.period" from-field="parameters.period" default-value="${initialView}"/>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy"/>
<set field="parentTypeId" from-field="parameters.parentTypeId" default-value="EVENT"/><!-- workeffortTypeId parent to ad events -->
</actions>
<widgets>
<include-screen name="CalendarOnly"/>
</widgets>
</section>
</screen>
<screen name="CalendarOnly">
<section>
<widgets>
<section>
<condition>
<if-compare field="parameters.period" operator="equals" value="day"/>
</condition>
<actions>
<set field="titleProperty" value="PageTitleCalendarDay"/>
<set field="tabButtonItem" value="day"/>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy"/>
</actions>
<widgets>
<include-screen name="eventDetail"/>
<container style="bothclear">
<screenlet title="${uiLabelMap.WorkEffortDayView}: ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, &quot;EEEE MMMM d, yyyy&quot;, timeZone, locale)}" navigation-menu-name="Day">
<include-menu name="Day" location="component://workeffort/widget/WorkEffortMenus.xml"/>
<platform-specific>
<html><html-template location="component://workeffort/webapp/workeffort/calendar/day.ftl"/></html>
</platform-specific>
</screenlet>
</container>
</widgets>
</section>
<section>
<condition>
<or>
<if-compare field="parameters.period" operator="equals" value="week"/>
<if-empty field="parameters.period"/>
</or>
</condition>
<actions>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy"/>
</actions>
<widgets>
<include-screen name="eventDetail"/>
<container style="bothclear">
<screenlet title="${uiLabelMap.WorkEffortWeekView}: ${uiLabelMap.CommonWeek} ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, &quot;w&quot;, timeZone, locale)}" navigation-menu-name="Week">
<include-menu name="Week" location="component://workeffort/widget/WorkEffortMenus.xml"/>
<platform-specific>
<html><html-template location="component://workeffort/webapp/workeffort/calendar/week.ftl"/></html>
</platform-specific>
</screenlet>
</container>
</widgets>
</section>
<section>
<condition>
<if-compare field="parameters.period" operator="equals" value="month"/>
</condition>
<actions>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy"/>
</actions>
<widgets>
<include-screen name="eventDetail"/>
<container style="bothclear">
<screenlet title="${uiLabelMap.WorkEffortMonthView}: ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, &quot;MMMM yyyy&quot;, timeZone, locale)}" navigation-menu-name="Month">
<include-menu name="Month" location="component://workeffort/widget/WorkEffortMenus.xml"/>
<platform-specific>
<html><html-template location="component://workeffort/webapp/workeffort/calendar/month.ftl"/></html>
</platform-specific>
</screenlet>
</container>
</widgets>
</section>
<section>
<condition>
<if-compare field="parameters.period" operator="equals" value="upcoming"/>
</condition>
<actions>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Upcoming.groovy"/>
</actions>
<widgets>
<include-screen name="eventDetail"/>
<container style="bothclear">
<screenlet title="${uiLabelMap.WorkEffortCalendarUpComingEventsView}" navigation-menu-name="Upcoming">
<include-menu name="Upcoming" location="component://workeffort/widget/WorkEffortMenus.xml"/>
<platform-specific>
<html><html-template location="component://workeffort/webapp/workeffort/calendar/upcoming.ftl"/></html>
</platform-specific>
</screenlet>
</container>
</widgets>
</section>
</widgets>
</section>
</screen>
<screen name="CalendarWithDecorator"><!-- used within the workeffort component to be able to add and show any workeffort type -->
<section>
<actions>
<script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
<set field="parameters.period" from-field="parameters.period" default-value="${initialView}"/>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy"/>
<set field="titleProperty" value="WorkEffortCalendar"/>
</actions>
<widgets>
<decorator-screen name="CommonCalendarDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-screen name="CalendarOnly"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="eventDetail">
<section>
<actions>
<entity-one entity-name="WorkEffort" value-field="workEffort"/>
<script location="component://workeffort/script/isCalOwner.groovy"/>
</actions>
<widgets>
<section>
<condition><!-- check if need to display detail screen -->
<and>
<if-compare field="parameters.form" operator="equals" value="edit"/>
<or>
<and>
<not><if-empty field="workEffort"/></not>
<if-compare field="workEffort.currentStatusId" operator="not-equals" value="CAL_CANCELLED"/>
</and>
<if-empty field="workEffort"/>
</or>
</and>
</condition>
<widgets>
<section><!-- check if edit form needs to be shown, otherwise show view only form -->
<condition>
<and>
<or>
<if-compare field="isCalOwner" operator="equals" value="true" type="Boolean"/>
<if-has-permission permission="WORKEFFORTMGR" action="ADMIN"/>
</or>
<if-compare field="workEffort.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/>
</and>
</condition>
<widgets><!-- edit section -->
<container style="lefthalf" >
<screenlet title="${uiLabelMap.WorkEffortAddCalendarEvent}">
<section>
<condition>
<not><if-empty field="workEffort"/></not>
</condition>
<widgets>
<include-form name="cancelEvent" location="component://workeffort/widget/CalendarForms.xml"/>
</widgets>
</section>
<include-form name="editCalEvent" location="component://workeffort/widget/CalendarForms.xml"/>
</screenlet>
</container>
<container style="righthalf">
<screenlet title="${uiLabelMap.WorkEffortParticipants}">
<include-form name="showCalEventRolesDel" location="component://workeffort/widget/CalendarForms.xml"/>
<section>
<condition>
<and>
<not><if-empty field="workEffort"/></not>
<if-compare field="workEffortTypeId" operator="not-equals" value="WES_PUBLIC"/>
</and>
</condition>
<widgets>
<include-form name="addCalEventRole" location="component://workeffort/widget/CalendarForms.xml"/>
</widgets>
</section>
</screenlet>
</container>
<container style="clear"/>
</widgets>
<fail-widgets><!-- view section -->
<container style="lefthalf">
<screenlet title="${uiLabelMap.WorkEffortSummary}">
<include-form name="showCalEvent" location="component://workeffort/widget/CalendarForms.xml"/>
</screenlet>
</container>
<container style="righthalf">
<screenlet title="${uiLabelMap.WorkEffortParticipants}">
<include-form name="showCalEventRoles" location="component://workeffort/widget/CalendarForms.xml"/>
</screenlet>
</container>
</fail-widgets>
</section>
</widgets>
</section>
</widgets>
</section>
</screen>
<screen name="calendarEventContent">
<section>
<actions>
<set field="periodType" value="${groovy: request.getAttribute('periodType');}"/>
<set field="workEffortId" value="${groovy: request.getAttribute('workEffortId');}"/>
<entity-one entity-name="WorkEffort" value-field="workEffort"/>
<get-related-one value-field="workEffort" relation-name="ParentWorkEffort" to-value-field="parentWorkEffort"/>
<get-related value-field="workEffort" relation-name="WorkOrderItemFulfillment" list="workOrderItemFulfillments"/>
<get-related value-field="parentWorkEffort" relation-name="WorkOrderItemFulfillment" list="parentWorkOrderItemFulfillments"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://workeffort/webapp/workeffort/calendar/calendarEventContent.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
</screens>