svn commit: r927881 - in /ofbiz/trunk/applications/workeffort: webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy webapp/workeffort/calendar/month.ftl widget/CalendarForms.xml

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

svn commit: r927881 - in /ofbiz/trunk/applications/workeffort: webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy webapp/workeffort/calendar/month.ftl widget/CalendarForms.xml

jacopoc
Author: jacopoc
Date: Fri Mar 26 14:47:28 2010
New Revision: 927881

URL: http://svn.apache.org/viewvc?rev=927881&view=rev
Log:
Added ability to hide events from the month calendar to only display aggregate data in each day.

Modified:
    ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy
    ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl
    ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy?rev=927881&r1=927880&r2=927881&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy Fri Mar 26 14:47:28 2010
@@ -22,6 +22,7 @@ fixedAssetId = parameters.fixedAssetId;
 partyId = parameters.partyId;
 workEffortTypeId = parameters.workEffortTypeId;
 calendarType = parameters.calendarType;
+hideEvents = parameters.hideEvents;
 
 urlParam = "";
 if (facilityId) {
@@ -54,6 +55,13 @@ if (calendarType) {
     urlParam = urlParam + "calendarType=" + calendarType;
 }
 
+if (hideEvents) {
+    if (urlParam) {
+        urlParam = urlParam + "&";
+    }
+    urlParam = urlParam + "hideEvents=" + hideEvents;
+}
+
 if (urlParam) {
     urlParam = "&" + urlParam;
 }

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=927881&r1=927880&r2=927881&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl Fri Mar 26 14:47:28 2010
@@ -71,7 +71,7 @@ height: auto;
       <#if (maxNumberOfPersons > 0)>
           ${uiLabelMap.WorkEffortMaxNumberOfPersons}: ${maxNumberOfPersons}<br/>
       </#if>
-
+      <#if parameters.hideEvents?default("") != "Y">
       <#list period.calendarEntries as calEntry>
         <#if calEntry.workEffort.actualStartDate?exists>
             <#assign startDate = calEntry.workEffort.actualStartDate>
@@ -109,6 +109,7 @@ height: auto;
         ${screens.render("component://workeffort/widget/CalendarScreens.xml#calendarEventContent")}
         <br />
       </#list>
+      </#if>
     </td>
 
 <#--

Modified: ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml?rev=927881&r1=927880&r2=927881&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml Fri Mar 26 14:47:28 2010
@@ -53,6 +53,7 @@ under the License.
                 </entity-options>
             </drop-down>
         </field>
+        <field name="hideEvents"><check/></field>
         <field name="viewButton" title="${uiLabelMap.CommonView}"><submit/></field>
     </form>
     <!-- Forms Specific to portlet -->