svn commit: r1227314 - in /ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar: calendarEventContent.ftl day.ftl month.ftl week.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1227314 - in /ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar: calendarEventContent.ftl day.ftl month.ftl week.ftl

adrianc
Author: adrianc
Date: Wed Jan  4 20:46:52 2012
New Revision: 1227314

URL: http://svn.apache.org/viewvc?rev=1227314&view=rev
Log:
Added the ability for applications to specify URLs for creating/editing calendar events in the calendar screens.

Modified:
    ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl
    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

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl?rev=1227314&r1=1227313&r2=1227314&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl Wed Jan  4 20:46:52 2012
@@ -50,7 +50,11 @@ under the License.
     </#list>
   </#if>
 <#else>
-  <a href="<@ofbizUrl>${parameters._LAST_VIEW_NAME_}?form=edit&amp;parentTypeId=${parentTypeId?if_exists}&amp;period=${periodType?if_exists}&amp;start=${parameters.start?if_exists}&amp;workEffortId=${workEffort.workEffortId}${addlParam?if_exists}${urlParam?if_exists}</@ofbizUrl>" class="event">
+  <#-- Allow containing screens to specify the URL for editing an event -->
+  <#if !editCalEventUrl?exists>
+    <#assign editCalEventUrl = parameters._LAST_VIEW_NAME_>
+  </#if>
+  <a href="<@ofbizUrl>${editCalEventUrl}?form=edit&amp;parentTypeId=${parentTypeId?if_exists}&amp;period=${periodType?if_exists}&amp;start=${parameters.start?if_exists}&amp;workEffortId=${workEffort.workEffortId}${addlParam?if_exists}${urlParam?if_exists}</@ofbizUrl>" class="event">
     ${workEffort.workEffortId}
   </a>
   &nbsp;${workEffort.workEffortName?default("")}

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=1227314&r1=1227313&r2=1227314&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl Wed Jan  4 20:46:52 2012
@@ -17,6 +17,10 @@ specific language governing permissions
 under the License.
 -->
 <#if periods?has_content>
+  <#-- Allow containing screens to specify the URL for creating a new event -->
+  <#if !newCalEventUrl?exists>
+    <#assign newCalEventUrl = parameters._LAST_VIEW_NAME_>
+  </#if>
   <#if (maxConcurrentEntries < 2)>
     <#assign entryWidth = 100>
   <#else>
@@ -33,7 +37,7 @@ under the License.
   <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>${parameters._LAST_VIEW_NAME_}?period=day&amp;form=edit&amp;parentTypeId=${parentTypeId?if_exists}&amp;start=${parameters.start?if_exists}&amp;currentStatusId=CAL_TENTATIVE&amp;estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&amp;estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${urlParam?if_exists}${addlParam?if_exists}</@ofbizUrl>">${uiLabelMap.CommonAddNew}</a>
+      <a href="<@ofbizUrl>${newCalEventUrl}?period=day&amp;form=edit&amp;parentTypeId=${parentTypeId?if_exists}&amp;start=${parameters.start?if_exists}&amp;currentStatusId=CAL_TENTATIVE&amp;estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&amp;estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${urlParam?if_exists}${addlParam?if_exists}</@ofbizUrl>">${uiLabelMap.CommonAddNew}</a>
     </td>
       <#list period.calendarEntries as calEntry>
         <#if calEntry.workEffort.actualStartDate?exists>

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=1227314&r1=1227313&r2=1227314&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl Wed Jan  4 20:46:52 2012
@@ -20,6 +20,10 @@ under the License.
 <#assign styleTd = "style='height: 8em; width: 10em; vertical-align: top; padding: 0.5em;'">
   
 <#if periods?has_content>
+  <#-- Allow containing screens to specify the URL for creating a new event -->
+  <#if !newCalEventUrl?exists>
+    <#assign newCalEventUrl = parameters._LAST_VIEW_NAME_>
+  </#if>
 <table cellspacing="0" class="basic-table calendar">
   <tr class="header-row">
     <td width="1%">&nbsp;</td>
@@ -40,7 +44,7 @@ under the License.
     </#if>
     <td ${styleTd} <#if currentPeriod> class="current-period"<#else><#if (period.calendarEntries?size > 0)> class="active-period"</#if></#if>>
       <span class="h1"><a href='<@ofbizUrl>${parameters._LAST_VIEW_NAME_}?period=day&amp;start=${period.start.time?string("#")}${urlParam?if_exists}${addlParam?if_exists}</@ofbizUrl>'>${period.start?date?string("d")?cap_first}</a></span>
-      <a class="add-new" href='<@ofbizUrl>${parameters._LAST_VIEW_NAME_}?period=month&amp;form=edit&amp;start=${parameters.start?if_exists}&amp;parentTypeId=${parentTypeId?if_exists}&amp;currentStatusId=CAL_TENTATIVE&amp;estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&amp;estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${urlParam?if_exists}${addlParam?if_exists}</@ofbizUrl>'>${uiLabelMap.CommonAddNew}</a>
+      <a class="add-new" href='<@ofbizUrl>${newCalEventUrl}?period=month&amp;form=edit&amp;start=${parameters.start?if_exists}&amp;parentTypeId=${parentTypeId?if_exists}&amp;currentStatusId=CAL_TENTATIVE&amp;estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&amp;estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${urlParam?if_exists}${addlParam?if_exists}</@ofbizUrl>'>${uiLabelMap.CommonAddNew}</a>
       <br class="clear"/>
 
       <#assign maxNumberOfPersons = 0/>

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=1227314&r1=1227313&r2=1227314&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl Wed Jan  4 20:46:52 2012
@@ -17,6 +17,10 @@ specific language governing permissions
 under the License.
 -->
 <#if periods?has_content>
+  <#-- Allow containing screens to specify the URL for creating a new event -->
+  <#if !newCalEventUrl?exists>
+    <#assign newCalEventUrl = parameters._LAST_VIEW_NAME_>
+  </#if>
   <#if (maxConcurrentEntries < 2)>
     <#assign entryWidth = 100>
   <#else>
@@ -33,7 +37,7 @@ under the License.
   <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>${parameters._LAST_VIEW_NAME_}?period=day&amp;start=${period.start.time?string("#")}${urlParam?if_exists}${addlParam?if_exists}</@ofbizUrl>">${period.start?date?string("EEEE")?cap_first}&nbsp;${period.start?date?string.short}</a><br />
-      <a href="<@ofbizUrl>${parameters._LAST_VIEW_NAME_}?period=week&amp;form=edit&amp;start=${parameters.start?if_exists}&amp;parentTypeId=${parentTypeId?if_exists}&amp;currentStatusId=CAL_TENTATIVE&amp;estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&amp;estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${addlParam?if_exists}${urlParam?if_exists}</@ofbizUrl>">${uiLabelMap.CommonAddNew}</a>
+      <a href="<@ofbizUrl>${newCalEventUrl}?period=week&amp;form=edit&amp;start=${parameters.start?if_exists}&amp;parentTypeId=${parentTypeId?if_exists}&amp;currentStatusId=CAL_TENTATIVE&amp;estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&amp;estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${addlParam?if_exists}${urlParam?if_exists}</@ofbizUrl>">${uiLabelMap.CommonAddNew}</a>
     </td>
     <#list period.calendarEntries as calEntry>
         <#if calEntry.workEffort.actualStartDate?exists>