Author: hansbak
Date: Sat Jun 20 04:16:52 2009 New Revision: 786755 URL: http://svn.apache.org/viewvc?rev=786755&view=rev Log: let calendar actual dates on workeffort override estimated dates, reorganized buttons on calendar, make the calendar portlet work in myportal and workeffort Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=786755&r1=786754&r2=786755&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Sat Jun 20 04:16:52 2009 @@ -485,9 +485,38 @@ if (entityExprList == null) { entityExprList = getDefaultWorkEffortExprList(partyIds, facilityId, fixedAssetId, workEffortTypeId); } - entityExprList.add(EntityCondition.makeCondition("estimatedStartDate", EntityOperator.LESS_THAN, endStamp)); - List<EntityCondition> completionExprList = UtilMisc.<EntityCondition>toList(EntityCondition.makeCondition("estimatedCompletionDate", EntityOperator.GREATER_THAN_EQUAL_TO, startStamp), EntityCondition.makeCondition("estimatedCompletionDate", EntityOperator.EQUALS, null)); - entityExprList.add(EntityCondition.makeCondition(completionExprList, EntityJoinOperator.OR)); + + // check the start dates + entityExprList.add( + EntityCondition.makeCondition(UtilMisc.<EntityCondition>toList( + EntityCondition.makeCondition(UtilMisc.<EntityCondition>toList( + EntityCondition.makeCondition("actualStartDate", EntityOperator.EQUALS, null), + EntityCondition.makeCondition("estimatedStartDate", EntityOperator.NOT_EQUAL, null), + EntityCondition.makeCondition("estimatedStartDate", EntityOperator.LESS_THAN_EQUAL_TO, startStamp) + ), EntityJoinOperator.AND), + EntityCondition.makeCondition(UtilMisc.<EntityCondition>toList( + EntityCondition.makeCondition("actualStartDate", EntityOperator.NOT_EQUAL, null), + EntityCondition.makeCondition("actualStartDate", EntityOperator.LESS_THAN_EQUAL_TO, startStamp) + ), EntityJoinOperator.AND) + ), EntityJoinOperator.OR)); + + // check the end dates + entityExprList.add( + EntityCondition.makeCondition(UtilMisc.<EntityCondition>toList( + EntityCondition.makeCondition(UtilMisc.<EntityCondition>toList( + EntityCondition.makeCondition("actualCompletionDate", EntityOperator.EQUALS, null), + EntityCondition.makeCondition("estimatedCompletionDate", EntityOperator.NOT_EQUAL, null), + EntityCondition.makeCondition("estimatedCompletionDate", EntityOperator.LESS_THAN_EQUAL_TO, endStamp) + ), EntityJoinOperator.AND), + EntityCondition.makeCondition(UtilMisc.<EntityCondition>toList( + EntityCondition.makeCondition("actualCompletionDate", EntityOperator.NOT_EQUAL, null), + EntityCondition.makeCondition("actualCompletionDate", EntityOperator.LESS_THAN_EQUAL_TO, endStamp) + ), EntityJoinOperator.AND), + EntityCondition.makeCondition("tempExprId", EntityOperator.NOT_EQUAL, null), + EntityCondition.makeCondition("estimatedMilliSeconds", EntityOperator.NOT_EQUAL, null), + EntityCondition.makeCondition("actualMilliSeconds", EntityOperator.NOT_EQUAL, null) + ), EntityJoinOperator.OR)); + if (filterOutCanceledEvents.booleanValue()) { entityExprList.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "EVENT_CANCELLED")); } @@ -565,6 +594,8 @@ List<Map<String, Object>> curWorkEfforts = FastList.newInstance(); Map<String, Object> entry = FastMap.newInstance(); for (GenericValue workEffort : validWorkEfforts) { + if (workEffort.getTimestamp("actualStartDate") != null) workEffort.put("estimatedStartDate", workEffort.getTimestamp("actualStartDate")); + if (workEffort.getTimestamp("actualCompletionDate") != null) workEffort.put("estimatedCompletionDate", workEffort.getTimestamp("actualCompletionDate")); DateRange weRange = new DateRange(workEffort.getTimestamp("estimatedStartDate"), workEffort.getTimestamp("estimatedCompletionDate")); if (periodRange.intersectsRange(weRange)) { Map<String, Object> calEntry = FastMap.newInstance(); Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml?rev=786755&r1=786754&r2=786755&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml Sat Jun 20 04:16:52 2009 @@ -63,10 +63,7 @@ <request-map uri="UserJobs"><security https="true" auth="true"/><response name="success" type="view" value="UserJobs"/></request-map> - <request-map uri="day"><security https="true" auth="true"/><response name="success" type="view" value="day"/></request-map> - <request-map uri="week"><security https="true" auth="true"/><response name="success" type="view" value="week"/></request-map> - <request-map uri="month"><security https="true" auth="true"/><response name="success" type="view" value="month"/></request-map> - <request-map uri="upcoming"><security https="true" auth="true"/><response name="success" type="view" value="upcoming"/></request-map> + <request-map uri="calendar"><security https="true" auth="true"/><response name="success" type="view" value="calendar"/></request-map> <!-- WorkEffort Related Summary request mappings --> <request-map uri="WorkEffortSummary"><security https="true" auth="true"/><response name="success" type="view" value="WorkEffortSummary"/></request-map> @@ -692,10 +689,7 @@ <view-map name="UserJobs" type="screen" page="component://workeffort/widget/WorkEffortScreens.xml#UserJobs"/> - <view-map name="day" type="screen" page="component://workeffort/widget/CalendarScreens.xml#CalendarDay"/> - <view-map name="week" type="screen" page="component://workeffort/widget/CalendarScreens.xml#CalendarWeek"/> - <view-map name="month" type="screen" page="component://workeffort/widget/CalendarScreens.xml#CalendarMonth"/> - <view-map name="upcoming" type="screen" page="component://workeffort/widget/CalendarScreens.xml#CalendarUpcoming"/> + <view-map name="calendar" type="screen" page="component://workeffort/widget/CalendarScreens.xml#CalendarWithDecorator"/> <view-map name="WorkEffortSummary" type="screen" page="component://workeffort/widget/WorkEffortRelatedSummaryScreens.xml#WorkEffortSummary"/> Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl?rev=786755&r1=786754&r2=786755&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl (original) +++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl Sat Jun 20 04:16:52 2009 @@ -36,16 +36,35 @@ <a href="<@ofbizUrl>EditWorkEffort?workEffortTypeId=EVENT¤tStatusId=CAL_TENTATIVE&estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${addlParam?if_exists}</@ofbizUrl>">${uiLabelMap.CommonAddNew}</a> </td> <#list period.calendarEntries as calEntry> + <#if calEntry.workEffort.actualStartDate?exists> + <#assign startDate = calEntry.workEffort.actualStartDate> + <#else> + <#assign startDate = calEntry.workEffort.estimatedStartDate> + </#if> + + <#if calEntry.workEffort.actualCompletionDate?exists> + <#assign completionDate = calEntry.workEffort.actualCompletionDate> + <#else> + <#assign completionDate = calEntry.workEffort.estimatedCompletionDate> + </#if> + + <#if !completionDate?exists> + <#assign completionDate = calEntry.workEffort.actualStartDate + calEntry.workEffort.actualMilliSeconds> + </#if> + <#if !completionDate?exists> + <#assign completionDate = calEntry.workEffort.estimatedStartDate + calEntry.workEffort.estimatedMilliSeconds> + </#if> + <#if calEntry.startOfPeriod> <td<#if (calEntry.periodSpan > 1)> rowspan="${calEntry.periodSpan}"</#if> width="${entryWidth?string("#")}%"> - <#if (calEntry.workEffort.estimatedStartDate.compareTo(start) <= 0 && calEntry.workEffort.estimatedCompletionDate.compareTo(next) >= 0)> + <#if (startDate.compareTo(start) <= 0 && completionDate.compareTo(next) >= 0)> ${uiLabelMap.CommonAllDay} - <#elseif calEntry.workEffort.estimatedStartDate.before(start)> - ${uiLabelMap.CommonUntil} ${calEntry.workEffort.estimatedCompletionDate?time?string.short} - <#elseif calEntry.workEffort.estimatedCompletionDate.after(next)> - ${uiLabelMap.CommonFrom} ${calEntry.workEffort.estimatedStartDate?time?string.short} + <#elseif startDate.before(start)> + ${uiLabelMap.CommonUntil} ${completionDate?time?string.short} + <#elseif completionDate.after(next)> + ${uiLabelMap.CommonFrom} ${startDate?time?string.short} <#else> - ${calEntry.workEffort.estimatedStartDate?time?string.short}-${calEntry.workEffort.estimatedCompletionDate?time?string.short} + ${startDate?time?string.short}-${completionDate?time?string.short} </#if> <br/><a href="<@ofbizUrl>WorkEffortSummary?workEffortId=${calEntry.workEffort.workEffortId}${addlParam?if_exists}</@ofbizUrl>">${calEntry.workEffort.workEffortName?default("Undefined")}</a> </td> </#if> Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl?rev=786755&r1=786754&r2=786755&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl (original) +++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl Sat Jun 20 04:16:52 2009 @@ -52,15 +52,33 @@ <a class="add-new" href='<@ofbizUrl>EditWorkEffort?workEffortTypeId=EVENT¤tStatusId=CAL_TENTATIVE&estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${addlParam?if_exists}</@ofbizUrl>'>${uiLabelMap.CommonAddNew}</a> <br class="clear"/> <#list period.calendarEntries as calEntry> + <#if calEntry.workEffort.actualStartDate?exists> + <#assign startDate = calEntry.workEffort.actualStartDate> + <#else> + <#assign startDate = calEntry.workEffort.estimatedStartDate> + </#if> + + <#if calEntry.workEffort.actualCompletionDate?exists> + <#assign completionDate = calEntry.workEffort.actualCompletionDate> + <#else> + <#assign completionDate = calEntry.workEffort.estimatedCompletionDate> + </#if> + + <#if !completionDate?exists> + <#assign completionDate = calEntry.workEffort.actualStartDate + calEntry.workEffort.actualMilliSeconds> + </#if> + <#if !completionDate?exists> + <#assign completionDate = calEntry.workEffort.estimatedStartDate + calEntry.workEffort.estimatedMilliSeconds> + </#if> <hr/> - <#if (calEntry.workEffort.estimatedStartDate.compareTo(period.start) <= 0 && calEntry.workEffort.estimatedCompletionDate.compareTo(period.end) >= 0)> + <#if (startDate.compareTo(period.start) <= 0 && completionDate.compareTo(period.end) >= 0)> ${uiLabelMap.CommonAllDay} - <#elseif calEntry.workEffort.estimatedStartDate.before(period.start)> - ${uiLabelMap.CommonUntil} ${calEntry.workEffort.estimatedCompletionDate?time?string.short} - <#elseif calEntry.workEffort.estimatedCompletionDate.after(period.end)> - ${uiLabelMap.CommonFrom} ${calEntry.workEffort.estimatedStartDate?time?string.short} + <#elseif startDate.before(period.start)> + ${uiLabelMap.CommonUntil} ${completionDate?time?string.short} + <#elseif completionDate.after(period.end)> + ${uiLabelMap.CommonFrom} ${startDate?time?string.short} <#else> - ${calEntry.workEffort.estimatedStartDate?time?string.short}-${calEntry.workEffort.estimatedCompletionDate?time?string.short} + ${startDate?time?string.short}-${completionDate?time?string.short} </#if> <br/> <a href="<@ofbizUrl>WorkEffortSummary?workEffortId=${calEntry.workEffort.workEffortId}${addlParam?if_exists}</@ofbizUrl>" class="event">${calEntry.workEffort.workEffortName?default("Undefined")}</a> ${calEntry.eventStatus?default(" ")} Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl?rev=786755&r1=786754&r2=786755&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl (original) +++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl Sat Jun 20 04:16:52 2009 @@ -36,18 +36,37 @@ <a href="<@ofbizUrl>EditWorkEffort?workEffortTypeId=EVENT¤tStatusId=CAL_TENTATIVE&estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${addlParam?if_exists}</@ofbizUrl>">${uiLabelMap.CommonAddNew}</a> </td> <#list period.calendarEntries as calEntry> + <#if calEntry.workEffort.actualStartDate?exists> + <#assign startDate = calEntry.workEffort.actualStartDate> + <#else> + <#assign startDate = calEntry.workEffort.estimatedStartDate> + </#if> + + <#if calEntry.workEffort.actualCompletionDate?exists> + <#assign completionDate = calEntry.workEffort.actualCompletionDate> + <#else> + <#assign completionDate = calEntry.workEffort.estimatedCompletionDate> + </#if> + + <#if !completionDate?exists> + <#assign completionDate = calEntry.workEffort.actualStartDate + calEntry.workEffort.actualMilliSeconds> + </#if> + <#if !completionDate?exists> + <#assign completionDate = calEntry.workEffort.estimatedStartDate + calEntry.workEffort.estimatedMilliSeconds> + </#if> + <#if calEntry.startOfPeriod> <td<#if (calEntry.periodSpan > 1)> rowspan="${calEntry.periodSpan}"</#if> width="${entryWidth?string("#")}%"> - <#if (calEntry.workEffort.estimatedStartDate.compareTo(start) <= 0 && calEntry.workEffort.estimatedCompletionDate.compareTo(next) >= 0)> + <#if (startDate.compareTo(start) <= 0 && completionDate.compareTo(next) >= 0)> ${uiLabelMap.CommonAllWeek} - <#elseif (calEntry.workEffort.estimatedStartDate.compareTo(period.start) = 0 && calEntry.workEffort.estimatedCompletionDate.compareTo(period.end) = 0)> + <#elseif (startDate.compareTo(period.start) = 0 && completionDate.compareTo(period.end) = 0)> ${uiLabelMap.CommonAllDay} - <#elseif calEntry.workEffort.estimatedStartDate.before(start)> - ${uiLabelMap.CommonUntil} ${calEntry.workEffort.estimatedCompletionDate?datetime?string.short} - <#elseif calEntry.workEffort.estimatedCompletionDate.after(next)> - ${uiLabelMap.CommonFrom} ${calEntry.workEffort.estimatedStartDate?time?string.short} + <#elseif startDate.before(start)> + ${uiLabelMap.CommonUntil} ${completionDate?datetime?string.short} + <#elseif completionDate.after(next)> + ${uiLabelMap.CommonFrom} ${startDate?time?string.short} <#else> - ${calEntry.workEffort.estimatedStartDate?time?string.short}-${calEntry.workEffort.estimatedCompletionDate?time?string.short} + ${startDate?time?string.short}-${completionDate?time?string.short} </#if> <br/><a href="<@ofbizUrl>WorkEffortSummary?workEffortId=${calEntry.workEffort.workEffortId}${addlParam?if_exists}</@ofbizUrl>" class="event">${calEntry.workEffort.workEffortName?default("Undefined")}</a> </td> </#if> Modified: ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml?rev=786755&r1=786754&r2=786755&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml (original) +++ ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml Sat Jun 20 04:16:52 2009 @@ -24,136 +24,96 @@ <screen name="Calendar"> <section> <widgets> - <include-menu name="CalendarPortlet" location="component://workeffort/widget/WorkEffortMenus.xml"/> <section> <condition> - <if-compare field="parameters.period" operator="equals" value="day"/> + <or> + <if-compare field="parameters.period" operator="equals" value="day"/> + <if-empty field="parameters.period"/> + </or> </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="CalendarDay"/> + <screenlet title="${uiLabelMap.WorkEffortDayView}: ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, "EEEE MMMM d, yyyy", 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> </widgets> </section> <section> <condition> <if-compare field="parameters.period" operator="equals" value="week"/> </condition> + <actions> + <set field="titleProperty" value="PageTitleCalendarWeek"/> + <set field="tabButtonItem" value="week"/> + <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy"/> + </actions> <widgets> - <include-screen name="CalendarWeek"/> + <screenlet title="${uiLabelMap.WorkEffortWeekView}: ${uiLabelMap.CommonWeek} ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, "w", 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> </widgets> </section> <section> <condition> - <or> - <if-compare field="parameters.period" operator="equals" value="month"/> - <if-empty field="parameters.period"/> - </or> + <if-compare field="parameters.period" operator="equals" value="month"/> </condition> + <actions> + <set field="titleProperty" value="PageTitleCalendarMonth"/> + <set field="tabButtonItem" value="month"/> + <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy"/> + </actions> <widgets> - <include-screen name="CalendarMonth"/> + <screenlet title="${uiLabelMap.WorkEffortMonthView}: ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, "MMMM yyyy", 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> </widgets> </section> <section> <condition> - <or> - <if-compare field="parameters.period" operator="equals" value="upcoming"/> - </or> + <if-compare field="parameters.period" operator="equals" value="upcoming"/> </condition> + <actions> + <set field="titleProperty" value="PageTitleCalendarUpcoming"/> + <set field="headerItem" value="calendar"/> + <set field="tabButtonItem" value="upcoming"/> + <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Upcoming.groovy"/> + </actions> <widgets> - <include-screen name="CalendarUpcoming"/> - </widgets> - </section> - </widgets> - </section> - </screen> - - <screen name="CalendarDay"> - <section> - <actions> - <set field="titleProperty" value="PageTitleCalendarDay"/> - <set field="headerItem" value="calendar"/> - <set field="tabButtonItem" value="day"/> - <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy"/> - </actions> - <widgets> - <decorator-screen name="CommonCalendarDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <screenlet title="${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, "EEEE MMMM d, yyyy", timeZone, locale)}" navigation-menu-name="Day"> - <include-menu name="Day" location="component://workeffort/widget/WorkEffortMenus.xml"/> + <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/day.ftl"/></html> + <html><html-template location="component://workeffort/webapp/workeffort/calendar/upcoming.ftl"/></html> </platform-specific> </screenlet> - </decorator-section> - </decorator-screen> + </widgets> + </section> </widgets> </section> </screen> - <screen name="CalendarWeek"> + <screen name="CalendarWithDecorator"> <section> - <actions> - <set field="titleProperty" value="PageTitleCalendarWeek"/> - <set field="headerItem" value="calendar"/> - <set field="tabButtonItem" value="week"/> - <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy"/> - </actions> <widgets> <decorator-screen name="CommonCalendarDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <screenlet title="${uiLabelMap.CommonWeek} ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, "w", 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> + <include-screen name="Calendar"/> </decorator-section> </decorator-screen> </widgets> </section> </screen> - <screen name="CalendarMonth"> - <section> - <actions> - <set field="titleProperty" value="PageTitleCalendarMonth"/> - <set field="headerItem" value="calendar"/> - <set field="tabButtonItem" value="month"/> - <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy"/> - </actions> - <widgets> - <decorator-screen name="CommonCalendarDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <screenlet title="${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, "MMMM yyyy", 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> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> - - <screen name="CalendarUpcoming"> - <section> - <actions> - <set field="titleProperty" value="PageTitleCalendarUpcoming"/> - <set field="headerItem" value="calendar"/> - <set field="tabButtonItem" value="upcoming"/> - <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Upcoming.groovy"/> - </actions> - <widgets> - <decorator-screen name="CommonCalendarDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <screenlet title="${uiLabelMap.WorkEffortCalendarUpComingEventsView}"> - <platform-specific> - <html><html-template location="component://workeffort/webapp/workeffort/calendar/upcoming.ftl"/></html> - </platform-specific> - </screenlet> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> </screens> \ No newline at end of file Modified: ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml?rev=786755&r1=786754&r2=786755&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml (original) +++ ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml Sat Jun 20 04:16:52 2009 @@ -129,6 +129,7 @@ <screen name="CommonCalendarDecorator"> <section> <actions> + <set field="headerItem" value="calendar"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> @@ -147,12 +148,12 @@ <entity-condition entity-name="WorkEffortType" list="allWorkEffortTypes"> <order-by field-name="description"/> </entity-condition> + <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy"/> </actions> <widgets> <platform-specific> <html><html-template location="component://workeffort/webapp/workeffort/calendar/eventsByForms.ftl"/></html> </platform-specific> - <include-menu name="Calendar" location="component://workeffort/widget/WorkEffortMenus.xml"/> <decorator-section-include name="body"/> </widgets> <fail-widgets> Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml?rev=786755&r1=786754&r2=786755&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml (original) +++ ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml Sat Jun 20 04:16:52 2009 @@ -23,7 +23,7 @@ <menu name="WorkEffortAppBar" title="${uiLabelMap.WorkEffortWorkEffortManagerApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="task" > <menu-item name="task" title="${uiLabelMap.WorkEffortTaskList}"><link target="mytasks"/></menu-item> - <menu-item name="calendar" title="${uiLabelMap.WorkEffortCalendar}"><link target="day"/></menu-item> + <menu-item name="calendar" title="${uiLabelMap.WorkEffortCalendar}"><link target="calendar"/></menu-item> <menu-item name="mytime" title="${uiLabelMap.WorkEffortTimesheetMyTime}"><link target="MyTimesheets"/></menu-item> <menu-item name="request" title="${uiLabelMap.WorkEffortRequestList}"><link target="requestlist"/></menu-item> <menu-item name="workeffort" title="${uiLabelMap.WorkEffortWorkEffort}"><link target="FindWorkEffort"/></menu-item> @@ -144,65 +144,73 @@ <link target="newEvent"/> </menu-item> </menu> - <menu name="Day"> + <menu name="Day" extends="Calendar"> <menu-item name="next" title="${uiLabelMap.WorkEffortNextDay}"> - <link target="week?start=${nextMillis}"/> + <link target="${parameters._LAST_VIEW_NAME_}?period=day&start=${nextMillis}"/> </menu-item> <menu-item name="toDay" title="${uiLabelMap.CommonToday}"> - <link target="day"/> + <link target="${parameters._LAST_VIEW_NAME_}"/> </menu-item> <menu-item name="prev" title="${uiLabelMap.WorkEffortPreviousDay}"> - <link target="week?start=${prevMillis}"/> + <link target="${parameters._LAST_VIEW_NAME_}?period=day&start=${prevMillis}"/> </menu-item> </menu> - <menu name="Week"> + <menu name="Week" extends="Calendar"> <menu-item name="next" title="${uiLabelMap.WorkEffortNextWeek}"> - <link target="week?start=${nextMillis}"/> + <link target="${parameters._LAST_VIEW_NAME_}?period=week&start=${nextMillis}"/> </menu-item> <menu-item name="thisWeek" title="${uiLabelMap.WorkEffortThisWeek}"> <link target="week"/> </menu-item> <menu-item name="prev" title="${uiLabelMap.WorkEffortPreviousWeek}"> - <link target="week?start=${prevMillis}"/> + <link target="${parameters._LAST_VIEW_NAME_}?period=week&start=${prevMillis}"/> </menu-item> </menu> - <menu name="Month"> + <menu name="Month" extends="Calendar"> <menu-item name="next" title="${uiLabelMap.WorkEffortNextMonth}"> - <link target="week?start=${nextMillis}"/> + <link target="${parameters._LAST_VIEW_NAME_}?period=month&start=${nextMillis}"/> </menu-item> <menu-item name="thisMonth" title="${uiLabelMap.WorkEffortThisMonth}"> - <link target="month"/> + <link target="${parameters._LAST_VIEW_NAME_}?period=month"/> </menu-item> <menu-item name="prev" title="${uiLabelMap.WorkEffortPreviousMonth}"> - <link target="week?start=${prevMillis}"/> + <link target="${parameters._LAST_VIEW_NAME_}?period=month&start=${prevMillis}"/> </menu-item> </menu> - <menu name="Calendar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> - <menu-item name="day" title="${uiLabelMap.WorkEffortDayView}"> - <link target="day"/> - </menu-item> - <menu-item name="week" title="${uiLabelMap.WorkEffortWeekView}"> - <link target="week"/> - </menu-item> - <menu-item name="month" title="${uiLabelMap.WorkEffortMonthView}"> - <link target="month"/> - </menu-item> + <menu name="Upcoming" extends="Calendar"> + </menu> + <menu name="Calendar"> <menu-item name="upcoming" title="${uiLabelMap.WorkEffortUpcomingEvents}"> - <link target="upcoming"/> + <condition> + <if-compare field="parameters.period" operator="not-equals" value="upcoming"/> + </condition> + <link target="${parameters._LAST_VIEW_NAME_}?period=upcoming"/> </menu-item> - </menu> - <menu name="CalendarPortlet" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> - <menu-item name="day" title="${uiLabelMap.WorkEffortDayView}"> - <link target="${parameters._LAST_VIEW_NAME_}?period=day"/> + <menu-item name="month" title="${uiLabelMap.WorkEffortMonthView}"> + <condition> + <if-compare field="parameters.period" operator="not-equals" value="month"/> + </condition> + <link target="${parameters._LAST_VIEW_NAME_}?period=month"/> </menu-item> <menu-item name="week" title="${uiLabelMap.WorkEffortWeekView}"> + <condition> + <if-compare field="parameters.period" operator="not-equals" value="week"/> + </condition> <link target="${parameters._LAST_VIEW_NAME_}?period=week"/> </menu-item> - <menu-item name="month" title="${uiLabelMap.WorkEffortMonthView}"> - <link target="${parameters._LAST_VIEW_NAME_}?period=month"/> + <menu-item name="day" title="${uiLabelMap.WorkEffortDayView}"> + <condition> + <and> + <if-compare field="parameters.period" operator="not-equals" value="day"/> + <not><if-empty field="parameters.period"/></not> + </and> + </condition> + <link target="${parameters._LAST_VIEW_NAME_}?period=day"/> </menu-item> - <menu-item name="upcoming" title="${uiLabelMap.WorkEffortUpcomingEvents}"> - <link target="${parameters._LAST_VIEW_NAME_}?period=upcoming"/> + <menu-item name="dummy" title="--------"> + <condition> + <if-compare field="parameters.period" operator="not-equals" value="upcoming"/> + </condition> </menu-item> </menu> </menus> Modified: ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml?rev=786755&r1=786754&r2=786755&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Sat Jun 20 04:16:52 2009 @@ -76,14 +76,6 @@ </section> </screen> - <screen name="CommonCalendarDecorator"> - <section> - <widgets> - <decorator-section-include name="body"/> - </widgets> - </section> - </screen> - <screen name="CommonMyTimeDecorator"> <section> <widgets> @@ -135,7 +127,19 @@ </widgets> </section> </screen> - + + <screen name="CommonWorkEffortDecorator"> + <section> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <decorator-section-include name="body"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="login"> <section> <widgets> |
Free forum by Nabble | Edit this page |