You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2008/07/17 20:06:01 UTC
svn commit: r677658 - in /ofbiz/trunk/applications/workeffort:
webapp/workeffort/calendar/day.ftl webapp/workeffort/calendar/month.ftl
webapp/workeffort/calendar/week.ftl widget/CalendarScreens.xml
Author: adrianc
Date: Thu Jul 17 11:06:00 2008
New Revision: 677658
URL: http://svn.apache.org/viewvc?rev=677658&view=rev
Log:
Some minor changes to the WorkEffort Calendar UI artifacts: added the ability to turn off the "Add New" links. This will benefit the components that reuse the calendar screens.
Modified:
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
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=677658&r1=677657&r2=677658&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl Thu Jul 17 11:06:00 2008
@@ -17,6 +17,9 @@
under the License.
-->
+<#-- The allowAddItem variable is used by components that reuse the WorkEffort
+calendar to control if the "Add New" links appear -->
+<#assign allowAddItem = allowAddItem?default(false)/>
<div class="screenlet-title-bar">
<ul>
<li class="h3">${start?date?string("EEEE")?cap_first} ${start?date?string.long}</li>
@@ -43,7 +46,9 @@
<tr<#if currentPeriod> class="current-period"<#else><#if (period.calendarEntries?size > 0)> class="active-period"</#if></#if>>
<td class="label">
${period.start?time?string.short}<br/>
- <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>
+ <#if allowAddItem>
+ <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>
+ </#if>
</td>
<#list period.calendarEntries as calEntry>
<#if calEntry.startOfPeriod>
@@ -51,13 +56,13 @@
<#if (calEntry.workEffort.estimatedStartDate.compareTo(start) <= 0 && calEntry.workEffort.estimatedCompletionDate.compareTo(next) >= 0)>
${uiLabelMap.CommonAllDay}
<#elseif calEntry.workEffort.estimatedStartDate.before(start)>
- ${uiLabelMap.CommonUntil}${calEntry.workEffort.estimatedCompletionDate?time?string.short}
+ ${uiLabelMap.CommonUntil} ${calEntry.workEffort.estimatedCompletionDate?time?string.short}
<#elseif calEntry.workEffort.estimatedCompletionDate.after(next)>
${uiLabelMap.CommonFrom} ${calEntry.workEffort.estimatedStartDate?time?string.short}
<#else>
${calEntry.workEffort.estimatedStartDate?time?string.short}-${calEntry.workEffort.estimatedCompletionDate?time?string.short}
</#if>
- <br/><a href="<@o...@ofbizUrl>">${calEntry.workEffort.workEffortName?default("Undefined")}${addlParam?if_exists}</a> </td>
+ <br/><a href="<@o...@ofbizUrl>">${calEntry.workEffort.workEffortName?default("Undefined")}</a> </td>
</#if>
</#list>
<#if (period.calendarEntries?size < maxConcurrentEntries)>
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=677658&r1=677657&r2=677658&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl Thu Jul 17 11:06:00 2008
@@ -17,6 +17,10 @@
under the License.
-->
+<#-- The allowAddItem variable is used by components that reuse the WorkEffort
+calendar to control if the "Add New" links appear -->
+<#assign allowAddItem = allowAddItem?default(false)/>
+
<style type="text/css">
.calendar tr td {
height: 8em;
@@ -59,7 +63,9 @@
</#if>
<td<#if currentPeriod> class="current-period"<#else><#if (period.calendarEntries?size > 0)> class="active-period"</#if></#if>>
<span class="h1"><a href='<@ofbizUrl>day?start=${period.start.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#...@ofbizUrl>'>${period.start?date?string("d")?cap_first}</a></span>
- <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>
+ <#if allowAddItem>
+ <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>
+ </#if>
<br class="clear"/>
<#list period.calendarEntries as calEntry>
<hr/>
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=677658&r1=677657&r2=677658&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl Thu Jul 17 11:06:00 2008
@@ -17,6 +17,9 @@
under the License.
-->
+<#-- The allowAddItem variable is used by components that reuse the WorkEffort
+calendar to control if the "Add New" links appear -->
+<#assign allowAddItem = allowAddItem?default(false)/>
<div class="screenlet-title-bar">
<ul>
<li class="h3">${uiLabelMap.CommonWeek} ${start?date?string("w")}</li>
@@ -43,7 +46,9 @@
<tr<#if currentPeriod> class="current-period"<#else><#if (period.calendarEntries?size > 0)> class="active-period"</#if></#if>>
<td class="centered" width="1%">
<a href="<@ofbizUrl>day?start=${period.start.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#...@ofbizUrl>">${period.start?date?string("EEEE")?cap_first} ${period.start?date?string.short}</a><br/>
- <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>
+ <#if allowAddItem>
+ <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>
+ </#if>
</td>
<#list period.calendarEntries as calEntry>
<#if calEntry.startOfPeriod>
Modified: ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml?rev=677658&r1=677657&r2=677658&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml Thu Jul 17 11:06:00 2008
@@ -20,12 +20,14 @@
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+
<screen name="CalendarDay">
<section>
<actions>
<set field="titleProperty" value="PageTitleCalendarDay"/>
<set field="headerItem" value="calendar"/>
<set field="tabButtonItem" value="day"/>
+ <set field="allowAddItem" value="true" type="Boolean"/>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy"/>
</actions>
<widgets>
@@ -39,13 +41,14 @@
</widgets>
</section>
</screen>
+
<screen name="CalendarWeek">
<section>
<actions>
<set field="titleProperty" value="PageTitleCalendarWeek"/>
<set field="headerItem" value="calendar"/>
<set field="tabButtonItem" value="week"/>
-
+ <set field="allowAddItem" value="true" type="Boolean"/>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy"/>
</actions>
<widgets>
@@ -59,13 +62,14 @@
</widgets>
</section>
</screen>
+
<screen name="CalendarMonth">
<section>
<actions>
<set field="titleProperty" value="PageTitleCalendarMonth"/>
<set field="headerItem" value="calendar"/>
<set field="tabButtonItem" value="month"/>
-
+ <set field="allowAddItem" value="true" type="Boolean"/>
<script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy"/>
</actions>
<widgets>
@@ -79,13 +83,13 @@
</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>