be able to add any workeffortype to the calendar in the workeffort component, reported by Adrian

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@901102 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2010-01-20 08:30:43 +00:00
parent f3e99cfe08
commit ec59752ad2
2 changed files with 22 additions and 4 deletions
@@ -40,10 +40,17 @@ under the License.
<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>
@@ -29,6 +29,14 @@ under the License.
<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>
@@ -115,15 +123,18 @@ under the License.
</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>