Author: hansbak
Date: Wed Jan 20 08:30:43 2010
New Revision: 901102
URL: http://svn.apache.org/viewvc?rev=901102&view=rev
Log:
be able to add any workeffortype to the calendar in the workeffort component,
reported by Adrian
Modified:
ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml
ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml
Modified: ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml?rev=901102&r1=901101&r2=901102&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml Wed Jan 20
08:30:43 2010
@@ -40,10 +40,17 @@
<field name="statusId" use-when="workEffort==null"><hidden
value="PRTYASGN_ASSIGNED"/></field>
<field name="workEffortName"
title="${uiLabelMap.WorkEffortEventName}"><text/></field>
<field name="description"
title="${uiLabelMap.CommonDescription}"><text/></field>
- <field name="workEffortTypeId">
+ <field name="workEffortTypeId" use-when="parentTypeId!=void">
<drop-down no-current-selected-key="MEETING">
<entity-options entity-name="WorkEffortType"
description="${description}">
- <entity-constraint name="parentTypeId"
value="${parameters.parentTypeId}"/>
+ <entity-constraint name="parentTypeId"
env-name="parentTypeId"/>
+ <entity-order-by field-name="description"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="workEffortTypeId" use-when="parentTypeId==void">
+ <drop-down>
+ <entity-options entity-name="WorkEffortType"
description="${description}">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
Modified: ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml?rev=901102&r1=901101&r2=901102&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml Wed Jan 20
08:30:43 2010
@@ -30,6 +30,14 @@
<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"/>
@@ -115,15 +123,18 @@
</section>
</screen>
- <screen name="CalendarWithDecorator">
+ <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="Calendar"/>
+ <include-screen name="CalendarOnly"/>
</decorator-section>
</decorator-screen>
</widgets>