svn commit: r565073 - in /ofbiz/trunk/applications/workeffort: src/org/ofbiz/workeffort/workeffort/ webapp/workeffort/WEB-INF/actions/calendar/ webapp/workeffort/calendar/ webapp/workeffort/task/

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

svn commit: r565073 - in /ofbiz/trunk/applications/workeffort: src/org/ofbiz/workeffort/workeffort/ webapp/workeffort/WEB-INF/actions/calendar/ webapp/workeffort/calendar/ webapp/workeffort/task/

adrianc
Author: adrianc
Date: Sun Aug 12 06:54:28 2007
New Revision: 565073

URL: http://svn.apache.org/viewvc?view=rev&rev=565073
Log:
Patch from OFBIZ-1089. Workeffort calendar supports user-selected time zones. Workeffort display still defaults to server's time zone. See comments in OFBIZ-1164.

Modified:
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
    ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/day.bsh
    ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/month.bsh
    ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/upcoming.bsh
    ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/week.bsh
    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/upcoming.ftl
    ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl
    ofbiz/trunk/applications/workeffort/webapp/workeffort/task/mytasks.ftl

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?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Sun Aug 12 06:54:28 2007
@@ -330,7 +330,8 @@
         Security security = ctx.getSecurity();
         GenericValue userLogin = (GenericValue) context.get("userLogin");    
         Locale locale = (Locale) context.get("locale");
-        
+        TimeZone timeZone = (TimeZone) context.get("timeZone");
+
         Timestamp startDay = (Timestamp) context.get("start");
         Integer numPeriodsInteger = (Integer) context.get("numPeriods");
 
@@ -346,8 +347,6 @@
         //To be returned, the max concurrent entries for a single period
         int maxConcurrentEntries = 0;
                 
-        TimeZone curTz = TimeZone.getDefault();
-
         Integer periodTypeObject = (Integer) context.get("periodType");
         int periodType = 0;
         if (periodTypeObject != null) {
@@ -358,10 +357,10 @@
         if(numPeriodsInteger != null) numPeriods = numPeriodsInteger.intValue();
         
         // get a timestamp (date) for the beginning of today and for beginning of numDays+1 days from now
-        Timestamp startStamp = UtilDateTime.getDayStart(startDay, curTz, locale);
-        Timestamp endStamp = UtilDateTime.adjustTimestamp(startStamp, periodType, 1, curTz, locale);
+        Timestamp startStamp = UtilDateTime.getDayStart(startDay, timeZone, locale);
+        Timestamp endStamp = UtilDateTime.adjustTimestamp(startStamp, periodType, 1, timeZone, locale);
         long periodLen = endStamp.getTime() - startStamp.getTime();
-        endStamp = UtilDateTime.adjustTimestamp(startStamp, periodType, numPeriods, curTz, locale);
+        endStamp = UtilDateTime.adjustTimestamp(startStamp, periodType, numPeriods, timeZone, locale);
         
         // Get the WorkEfforts
         List validWorkEfforts = null;
@@ -395,8 +394,8 @@
         
             // For each day in the set we check all work efforts to see if they fall within range
             for (int i = 0; i < numPeriods; i++) {
-                Timestamp curPeriodStart = UtilDateTime.adjustTimestamp(startStamp, periodType, i, curTz, locale);
-                Timestamp curPeriodEnd = UtilDateTime.adjustTimestamp(curPeriodStart, periodType, 1, curTz, locale);
+                Timestamp curPeriodStart = UtilDateTime.adjustTimestamp(startStamp, periodType, i, timeZone, locale);
+                Timestamp curPeriodEnd = UtilDateTime.adjustTimestamp(curPeriodStart, periodType, 1, timeZone, locale);
                 List curWorkEfforts = new ArrayList();
                 Map entry = new HashMap();
                 for (int j = 0; j < validWorkEfforts.size(); j++) {
@@ -594,4 +593,5 @@
         resultMap.put("summaryOutByFacility", summaryOutByFacility);
         return resultMap;
     }
+
 }

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/day.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/day.bsh?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/day.bsh (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/day.bsh Sun Aug 12 06:54:28 2007
@@ -18,6 +18,7 @@
  */
 
 import java.util.*;
+import java.text.*;
 import org.ofbiz.entity.*;
 import org.ofbiz.base.util.*;
 import org.ofbiz.webapp.pseudotag.*;
@@ -41,24 +42,21 @@
     eventsParam = "partyId=" + partyId;
 }
 
-Timestamp now = UtilDateTime.getDayStart(UtilDateTime.nowTimestamp());
 Timestamp start = null;
 if(startParam != null) {
     start = new Timestamp(Long.parseLong(startParam));
 }
 if(start == null) {
-    start = now;
+    start = UtilDateTime.getDayStart(nowTimestamp, timeZone, locale);
 } else {
-    start = UtilDateTime.getDayStart(start);
+    start = UtilDateTime.getDayStart(start, timeZone, locale);
 }
 
-Timestamp prev = UtilDateTime.getDayStart(start,-1);
-Timestamp next = UtilDateTime.getDayStart(start,1);
+Timestamp prev = UtilDateTime.getDayStart(start, -1, timeZone, locale);
+Timestamp next = UtilDateTime.getDayStart(start, 1, timeZone, locale);
 
 Map serviceCtx = UtilMisc.toMap("userLogin", userLogin,"start",start,"numPeriods",new Integer(24),"periodType",new Integer(Calendar.HOUR));
-serviceCtx.put("partyId", partyId);
-serviceCtx.put("facilityId", facilityId);
-serviceCtx.put("fixedAssetId", fixedAssetId);
+serviceCtx.putAll(UtilMisc.toMap("partyId", partyId, "facilityId", facilityId, "fixedAssetId", fixedAssetId, "locale", locale, "timeZone", timeZone));
 
 Map result = dispatcher.runSync("getWorkEffortEventsByPeriod",serviceCtx);
 context.put("periods",result.get("periods"));
@@ -66,5 +64,4 @@
 context.put("start",start);
 context.put("prev",prev);
 context.put("next",next);
-context.put("now",now);
 context.put("eventsParam", eventsParam);

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/month.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/month.bsh?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/month.bsh (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/month.bsh Sun Aug 12 06:54:28 2007
@@ -17,14 +17,14 @@
  * under the License.
  */
 
+import java.sql.*;
+import java.text.*;
 import java.util.*;
 import org.ofbiz.security.*;
 import org.ofbiz.entity.*;
 import org.ofbiz.base.util.*;
 import org.ofbiz.webapp.pseudotag.*;
 import org.ofbiz.workeffort.workeffort.*;
-import java.sql.Timestamp;
-import java.util.Calendar;
 
 startParam = parameters.get("start");
 
@@ -43,24 +43,22 @@
     eventsParam = "partyId=" + partyId;
 }
 
-now = UtilDateTime.getMonthStart(UtilDateTime.nowTimestamp());
 start = null;
-if(startParam != null) {
+if(UtilValidate.isNotEmpty(startParam)) {
     start = new Timestamp(Long.parseLong(startParam));
 }
 if(start == null) {
-    start = now;
+    start = UtilDateTime.getMonthStart(nowTimestamp, timeZone, locale);
 } else {
-    start = UtilDateTime.getMonthStart(start);
+    start = UtilDateTime.getMonthStart(start, timeZone, locale);
 }
 
-tempCal = Calendar.getInstance();
-tempCal.setTime(new java.util.Date(start.getTime()));
+tempCal = UtilDateTime.toCalendar(start, timeZone, locale);
 numDays = tempCal.getActualMaximum(Calendar.DAY_OF_MONTH);
 
-prev = UtilDateTime.getMonthStart(start,-1);
-next = UtilDateTime.getDayStart(start,numDays+1);
-end = UtilDateTime.getDayStart(start,numDays);
+prev = UtilDateTime.getMonthStart(start, -1, timeZone, locale);
+next = UtilDateTime.getDayStart(start, numDays+1, timeZone, locale);
+end = UtilDateTime.getDayStart(start, numDays, timeZone, locale);
 
 //Find out what date to get from
 getFrom = null;
@@ -68,12 +66,12 @@
 if(prevMonthDays < 0) prevMonthDays = 7 + prevMonthDays;
 tempCal.add(Calendar.DATE,-(prevMonthDays));
 numDays += prevMonthDays;
-getFrom = new Timestamp(tempCal.getTime().getTime());
+getFrom = new Timestamp(tempCal.getTimeInMillis());
+firstWeekNum = tempCal.get(Calendar.WEEK_OF_YEAR);
+context.put("firstWeekNum", new Integer(firstWeekNum));
 
 serviceCtx = UtilMisc.toMap("userLogin", userLogin, "start", getFrom,"numPeriods", new Integer(numDays), "periodType", new Integer(Calendar.DATE));
-serviceCtx.put("partyId", partyId);
-serviceCtx.put("facilityId", facilityId);
-serviceCtx.put("fixedAssetId", fixedAssetId);
+serviceCtx.putAll(UtilMisc.toMap("partyId", partyId, "facilityId", facilityId, "fixedAssetId", fixedAssetId, "locale", locale, "timeZone", timeZone));
 
 result = dispatcher.runSync("getWorkEffortEventsByPeriod", serviceCtx);
 
@@ -83,5 +81,4 @@
 context.put("end", end);
 context.put("prev", prev);
 context.put("next", next);
-context.put("now", now);
 context.put("eventsParam", eventsParam);

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/upcoming.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/upcoming.bsh?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/upcoming.bsh (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/upcoming.bsh Sun Aug 12 06:54:28 2007
@@ -27,7 +27,7 @@
 facilityId = parameters.get("facilityId");
 fixedAssetId = parameters.get("fixedAssetId");
 partyId = parameters.get("partyId");
-start = UtilDateTime.nowTimestamp();
+start = nowTimestamp.clone();
 eventsParam = "";
 if (facilityId != null) {
     eventsParam = "facilityId=" + facilityId;
@@ -39,10 +39,8 @@
     eventsParam = "partyId=" + partyId;
 }
 
-Map serviceCtx = UtilMisc.toMap("userLogin", userLogin,"start", start,"numPeriods",new Integer(7),"periodType",new Integer(Calendar.DATE));
-serviceCtx.put("partyId", partyId);
-serviceCtx.put("facilityId", facilityId);
-serviceCtx.put("fixedAssetId", fixedAssetId);
+Map serviceCtx = UtilMisc.toMap("userLogin", userLogin, "start", start, "numPeriods", new Integer(7), "periodType", new Integer(Calendar.DATE));
+serviceCtx.putAll(UtilMisc.toMap("partyId", partyId, "facilityId", facilityId, "fixedAssetId", fixedAssetId, "locale", locale, "timeZone", timeZone));
 
 Map result = dispatcher.runSync("getWorkEffortEventsByPeriod",serviceCtx);
 context.put("days", result.get("periods"));

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/week.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/week.bsh?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/week.bsh (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/week.bsh Sun Aug 12 06:54:28 2007
@@ -43,25 +43,22 @@
     eventsParam = "partyId=" + partyId;
 }
 
-Timestamp now = UtilDateTime.getWeekStart(UtilDateTime.nowTimestamp());
 Timestamp start = null;
 if(startParam != null)
     start = new Timestamp(Long.parseLong(startParam));
     
 if(start == null) {
-    start = now;
+    start = UtilDateTime.getWeekStart(nowTimestamp, timeZone, locale);
 } else {
-    start = UtilDateTime.getWeekStart(start);
+    start = UtilDateTime.getWeekStart(start, timeZone, locale);
 }
     
-Timestamp prev = UtilDateTime.getDayStart(start,-7);
-Timestamp next = UtilDateTime.getDayStart(start,7);
-Timestamp end = UtilDateTime.getDayStart(start,6);
+Timestamp prev = UtilDateTime.getDayStart(start, -7, timeZone, locale);
+Timestamp next = UtilDateTime.getDayStart(start, 7, timeZone, locale);
+Timestamp end = UtilDateTime.getDayStart(start, 6, timeZone, locale);
 
 Map serviceCtx = UtilMisc.toMap("userLogin", userLogin,"start",start,"numPeriods",new Integer(7),"periodType",new Integer(Calendar.DATE));
-serviceCtx.put("partyId", partyId);
-serviceCtx.put("facilityId", facilityId);
-serviceCtx.put("fixedAssetId", fixedAssetId);
+serviceCtx.putAll(UtilMisc.toMap("partyId", partyId, "facilityId", facilityId, "fixedAssetId", fixedAssetId, "locale", locale, "timeZone", timeZone));
 
 Map result = dispatcher.runSync("getWorkEffortEventsByPeriod",serviceCtx);
 context.put("periods",result.get("periods"));
@@ -70,5 +67,4 @@
 context.put("end",end);
 context.put("prev",prev);
 context.put("next",next);
-context.put("now",now);
 context.put("eventsParam", eventsParam);

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?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl Sun Aug 12 06:54:28 2007
@@ -22,7 +22,7 @@
     <ul>
       <h2>${start?date?string("EEEE")?cap_first} ${start?date?string.long}</h2>
       <li><a href="<@ofbizUrl>day?start=${next.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>">${uiLabelMap.WorkEffortNextDay}</a></li>
-      <li><a href="<@ofbizUrl>day?start=${now.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>">${uiLabelMap.CommonToday}</a></li>
+      <li><a href="<@ofbizUrl>day?start=${nowTimestamp.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>">${uiLabelMap.CommonToday}</a></li>
       <li><a href="<@ofbizUrl>day?start=${prev.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>">${uiLabelMap.WorkEffortPreviousDay}</a></li>
     </ul>
     <br class="clear"/>

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?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl Sun Aug 12 06:54:28 2007
@@ -16,18 +16,13 @@
 specific language governing permissions and limitations
 under the License.
 -->
-<#-- I'm not quite sure why these should be "en". But I'm sure it works with it and don't without.
-I assume it's because we calculate date before in this locale (set from command line) - JLR 21/10/2006
-Please see https://issues.apache.org/jira/browse/OFBIZ-392-->
-<#setting locale="en">
-<#assign locale="en">
 
 <div class="screenlet">
   <div class="screenlet-title-bar">
     <ul>
       <h2>${start?date?string("MMMM yyyy")?cap_first}</h2>
       <li><a href='<@ofbizUrl>month?start=${next.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>'>${uiLabelMap.WorkEffortNextMonth}</a></li>
-      <li><a href='<@ofbizUrl>month?start=${now.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>'>${uiLabelMap.WorkEffortThisMonth}</a></li>
+      <li><a href='<@ofbizUrl>month?start=${nowTimestamp.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>'>${uiLabelMap.WorkEffortThisMonth}</a></li>
       <li><a href='<@ofbizUrl>month?start=${prev.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>'>${uiLabelMap.WorkEffortPreviousMonth}</a></li>
     </ul>
     <br class="clear"/>

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/upcoming.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/upcoming.ftl?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/upcoming.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/upcoming.ftl Sun Aug 12 06:54:28 2007
@@ -17,49 +17,35 @@
 under the License.
 -->
 
-<table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside">
-  <tr>
-    <td width="100%">
-      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop">
-        <tr>
-          <td align="left" class="boxhead">${uiLabelMap.WorkEffortCalendarUpComingEventsView}</td>
-        </tr>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td width="100%">
-      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxbottom">
-        <tr>
-          <td>
-          <#if days?has_content>
-              <table width="100%" cellpadding="2" cellspacing="0" border="0">
-                <tr>
-                  <td><div class="tabletext"><b>${uiLabelMap.CommonStartDateTime}</b></div></td>
-                  <td><div class="tabletext"><b>${uiLabelMap.CommonEndDateTime}</b></div></td>
-                  <td><div class="tabletext"><b>${uiLabelMap.WorkEffortEventName}</b></div></td>
-                </tr>                
-                <#list days as day>
-                  <#assign workEfforts = day.calendarEntries>
-                  <#if workEfforts?has_content>
-                    <tr><td colspan="3"><hr class="sepbar"/></td></tr>
-                    <#list workEfforts as calendarEntry>
-                      <#assign workEffort = calendarEntry.workEffort>
-                      <tr>
-                        <td><div class="tabletext">${workEffort.estimatedStartDate}</div></td>
-                        <td><div class="tabletext">${workEffort.estimatedCompletionDate}</div></td>
-                        <td><a class="buttontext" href="<@ofbizUrl>EditWorkEffort?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortName}</a></div></td>
-                      </tr>
-                    </#list>
-                  </#if>
-                </#list>
-              </table>
-            <#else>
-              <div class="tabletext">${uiLabelMap.WorkEffortNoEventsFound}.</div>
-            </#if>
-          </td>
-        </tr>
-      </table>
-    </td>
-  </tr>
-</table>
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <h3>${uiLabelMap.WorkEffortCalendarUpComingEventsView}</h3>
+  </div>
+  <#if days?has_content>
+    <table class="basic-table hover-bar" cellspacing="0">
+      <tr class="header-row">
+        <th>${uiLabelMap.CommonStartDateTime}</th>
+        <th>${uiLabelMap.CommonEndDateTime}</th>
+        <th>${uiLabelMap.WorkEffortEventName}</th>
+      </tr>
+      <#list days as day>
+        <#assign workEfforts = day.calendarEntries>
+        <#if workEfforts?has_content>
+          <tr class="header-row"><th colspan="3"><hr/></th></tr>
+          <#assign alt_row = false>
+          <#list workEfforts as calendarEntry>
+            <#assign workEffort = calendarEntry.workEffort>
+            <tr<#if alt_row> class="alternate-row"</#if>>
+              <td>${workEffort.estimatedStartDate}</td>
+              <td>${workEffort.estimatedStartDate}</td>
+              <td class="button-col"><a href="<@ofbizUrl>EditWorkEffort?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortName}</a></td>
+            </tr>
+            <#assign alt_row = !alt_row>
+          </#list>
+        </#if>
+      </#list>
+    </table>
+  <#else>
+    <div class="screenlet-body">${uiLabelMap.WorkEffortNoEventsFound}.</div>
+  </#if>
+</div>

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?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl Sun Aug 12 06:54:28 2007
@@ -22,7 +22,7 @@
     <ul>
       <h2>${uiLabelMap.CommonWeek} ${start?date?string("w")}</h2>
       <li><a href="<@ofbizUrl>week?start=${next.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>">${uiLabelMap.WorkEffortNextWeek}</a></li>
-      <li><a href="<@ofbizUrl>week?start=${now.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>">${uiLabelMap.WorkEffortThisWeek}</a></li>
+      <li><a href="<@ofbizUrl>week?start=${nowTimestamp.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>">${uiLabelMap.WorkEffortThisWeek}</a></li>
       <li><a href="<@ofbizUrl>week?start=${prev.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>">${uiLabelMap.WorkEffortPreviousWeek}</a></li>
     </ul>
     <br class="clear"/>
@@ -44,7 +44,7 @@
   </tr>
   <#list periods as period>
   <tr>
-    <td valign="top" nowrap width="1%" class="monthweekheader" height="36"><a href="<@ofbizUrl>day?start=${period.start.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>" class="monthweeknumber">${period.start?date?string("EEEE")?cap_first} ${period.start?date?string("d/M")?cap_first}</a><br/>
+    <td valign="top" nowrap width="1%" class="monthweekheader" height="36"><a href="<@ofbizUrl>day?start=${period.start.time?string("#")}<#if eventsParam?has_content>&${eventsParam}</#if></@ofbizUrl>" class="monthweeknumber">${period.start?date?string("EEEE")?cap_first} ${period.start?date?string.short}</a><br/>
       <a href="<@ofbizUrl>EditWorkEffort?workEffortTypeId=EVENT&currentStatusId=CAL_TENTATIVE&estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}</@ofbizUrl>">${uiLabelMap.CommonAddNew}</a>
     </td>
     <#list period.calendarEntries as calEntry>

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/task/mytasks.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/task/mytasks.ftl?view=diff&rev=565073&r1=565072&r2=565073
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/task/mytasks.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/task/mytasks.ftl Sun Aug 12 06:54:28 2007
@@ -17,165 +17,122 @@
 under the License.
 -->
 
-<table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside">
-  <tr>
-    <td width="100%">
-      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop">
-        <tr>
-          <td align="left" width="40%" >
-            <div class="boxhead">${uiLabelMap.WorkEffortMyCurrentTaskList}</div>
-          </td>
-          <td align="right" width="60%">
-            <a href="<@ofbizUrl>EditWorkEffort?workEffortTypeId=TASK&amp;currentStatusId=CAL_NEEDS_ACTION</@ofbizUrl>" class="submenutextright">${uiLabelMap.WorkEffortNewTask}</a>
-          </td>
-        </tr>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td width="100%">
-      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxbottom">
-        <tr>
-          <td>
-              <h3>${uiLabelMap.WorkEffortAssignedTasks}</h3>
-              <table width="100%" cellpadding="2" cellspacing="0" border="0">
-                <tr>
-                  <td><div class="tabletext"><b>${uiLabelMap.CommonStartDateTime}</b></div></td>
-                  <td><div class="tabletext"><b>${uiLabelMap.WorkEffortPriority}</b></div></td>
-                  <td><div class="tabletext"><b>${uiLabelMap.WorkEffortStatus}</b></div></td>
-                  <td><div class="tabletext"><b>${uiLabelMap.WorkEffortTaskName}</b></div></td>
-                  <td align="right"><div class="tabletext"><b>${uiLabelMap.CommonEdit}</b></div></td>
-                </tr>
-                <tr><td colspan="5"><HR class="sepbar"></td></tr>
-                <#list tasks as workEffort>
-                  <tr>
-                    <td><div class="tabletext">${(workEffort.estimatedStartDate.toString())?if_exists}</div></td>
-                    <td><div class="tabletext">${workEffort.priority?if_exists}</div></td>
-                    <td><div class="tabletext">${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</div></td>
-                    <td><A class="linktext" href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortName}</a></div></td>
-                    <td align="right" width="1%"><A class="buttontext" href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortId}</a></div></td>
-                  </tr>
-                </#list>
-              </table>
-          </td>
-        </tr>
-      </table>
-    </td>
-  </tr>
+<#setting locale = locale.toString()>
+<#setting time_zone = timeZone.getID()>
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+      <li class="head3">${uiLabelMap.WorkEffortMyCurrentTaskList}</li>
+      <li><a href="<@ofbizUrl>EditWorkEffort?workEffortTypeId=TASK&amp;currentStatusId=CAL_NEEDS_ACTION</@ofbizUrl>">${uiLabelMap.WorkEffortNewTask}</a></li>
+    </ul>
+    <br class="clear"/>
+  </div>
+  <h3>${uiLabelMap.WorkEffortAssignedTasks}</h3>
+  <table class="basic-table hover-bar" cellspacing="0">
+    <tr class="header-row">
+      <td>${uiLabelMap.CommonStartDateTime}</td>
+      <td>${uiLabelMap.WorkEffortPriority}</td>
+      <td>${uiLabelMap.WorkEffortStatus}</td>
+      <td>${uiLabelMap.WorkEffortTaskName}</td>
+      <td>${uiLabelMap.CommonEdit}</td>
+    </tr>
+    <#assign alt_row = false>
+    <#list tasks as workEffort>
+      <tr<#if alt_row> class="alternate-row"</#if>>
+        <td>${(workEffort.estimatedStartDate.toString())?if_exists}</td>
+        <td>${workEffort.priority?if_exists}</td>
+        <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</td>
+        <td><a href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortName}</a></td>
+        <td class="button-col"><a href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortId}</a></td>
+      </tr>
+      <#assign alt_row = !alt_row>
+    </#list>
+  </table>
   <#if (activities.size() > 0)>
-      <tr>
-        <td width="100%">
-          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxbottom">
-            <tr>
-              <td>
-                  <h3>${uiLabelMap.WorkEffortWorkflowActivitiesUser}</h3>
-                  <table width="100%" cellpadding="2" cellspacing="0" border="0">
-                    <tr>
-                      <td><div class="tabletext"><b>${uiLabelMap.CommonStartDateTime}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortPriority}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortActivityStatus}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortMyStatus}</b></div></td>
-                      <#-- <td><div class="tabletext"><b>${uiLabelMap.PartyPartyId}</b></div></td> -->
-                      <td><div class="tabletext"><b>${uiLabelMap.PartyRoleId}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortActivityName}</b></div></td>
-                      <td align="right"><div class="tabletext"><b>${uiLabelMap.CommonEdit}</b></div></td>
-                    </tr>
-                    <tr><td colspan="8"><HR class="sepbar"></td></tr>
-                    <#list activities as workEffort>
-                      <tr>
-                        <td><div class="tabletext">${(workEffort.estimatedStartDate.toString())?if_exists}</div></td>
-                        <td><div class="tabletext">${workEffort.priority?if_exists}</div></td>
-                        <td><div class="tabletext">${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</div></td>
-                        <td><div class="tabletext">${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId"))).get("description",locale))?if_exists}</div></td>
-                        <#-- <td><div class="tabletext">${workEffort.partyId}</div></td> -->
-                        <td><div class="tabletext">${workEffort.roleTypeId}</div></td>
-                        <td><A class="linktext" href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortName}</a></div></td>
-                        <td align="right"><A class="buttontext" href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortId}</a></div></td>
-                      </tr>
-                    </#list>
-                  </table>
-              </td>
-            </tr>
-          </table>
-        </td>
+    <h3>${uiLabelMap.WorkEffortWorkflowActivitiesUser}</h3>
+    <table class="basic-table hover-bar" cellspacing="0">
+      <tr class="header-row">
+        <td>${uiLabelMap.CommonStartDateTime}</td>
+        <td>${uiLabelMap.WorkEffortPriority}</td>
+        <td>${uiLabelMap.WorkEffortActivityStatus}</td>
+        <td>${uiLabelMap.WorkEffortMyStatus}</td>
+        <#-- <td>${uiLabelMap.PartyPartyId}</td> -->
+        <td>${uiLabelMap.PartyRoleId}</td>
+        <td>${uiLabelMap.WorkEffortActivityName}</td>
+        <td>${uiLabelMap.CommonEdit}</td>
       </tr>
+      <#assign alt_row = false>
+      <#list activities as workEffort>
+        <tr<#if alt_row> class="alternate-row"</#if>>
+          <td>${(workEffort.estimatedStartDate.toString())?if_exists}</td>
+          <td>${workEffort.priority?if_exists}</td>
+          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</td>
+          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId"))).get("description",locale))?if_exists}</td>
+          <#-- <td>${workEffort.partyId}</td> -->
+          <td>${workEffort.roleTypeId}</td>
+          <td><a href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortName}</a></td>
+          <td class="button-col"><a href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortId}</a></td>
+        </tr>
+        <#assign alt_row = !alt_row>
+      </#list>
+    </table>
   </#if>
   <#if (roleActivities.size() > 0)>
-      <tr>
-        <td width="100%">
-          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxbottom">
-            <tr>
-              <td>
-                  <h3>${uiLabelMap.WorkEffortWorkflowActivitiesUserRole}</h3>
-                  <table width="100%" cellpadding="2" cellspacing="0" border="0">
-                    <tr>
-                      <td><div class="tabletext"><b>${uiLabelMap.CommonStartDateTime}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortPriority}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortActivityStatus}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortMyStatus}</b></div></td>
-                      <#-- <td><div class="tabletext"><b>${uiLabelMap.PartyPartyId}</b></div></td> -->
-                      <td><div class="tabletext"><b>${uiLabelMap.PartyRoleId}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortActivityName}</b></div></td>
-                      <td align="right"><div class="tabletext"><b>${uiLabelMap.CommonEdit}</b></div></td>
-                    </tr>
-                    <tr><td colspan="8"><HR class="sepbar"></td></tr>
-                    <#list roleActivities as workEffort>
-                      <tr>
-                        <td><div class="tabletext">${(workEffort.estimatedStartDate.toString())?if_exists}</div></td>
-                        <td><div class="tabletext">${workEffort.priority?if_exists}</div></td>
-                        <td><div class="tabletext">${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</div></td>
-                        <td><div class="tabletext">${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId"))).get("description",locale))?if_exists}</div></td>
-                        <#-- <td><div class="tabletext">${workEffort.partyId}</div></td> -->
-                        <td><div class="tabletext">${workEffort.roleTypeId}</div></td>
-                        <td><A class="buttontext" href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortName}</a></div></td>
-                        <td align="right"><A class="buttontext" href="<@ofbizUrl>acceptRoleAssignment?workEffortId=${workEffort.workEffortId}&partyId=${workEffort.partyId}&roleTypeId=${workEffort.roleTypeId}&fromDate=${workEffort.fromDate.toString()}</@ofbizUrl>">${uiLabelMap.WorkEffortAcceptAssignment}&nbsp;[${workEffort.workEffortId}]</a></div></td>
-                      </tr>
-                    </#list>
-                  </table>
-              </td>
-            </tr>
-          </table>
-        </td>
+    <h3>${uiLabelMap.WorkEffortWorkflowActivitiesUserRole}</h3>
+    <table class="basic-table hover-bar" cellspacing="0">
+      <tr class="header-row">
+        <td>${uiLabelMap.CommonStartDateTime}</td>
+        <td>${uiLabelMap.WorkEffortPriority}</td>
+        <td>${uiLabelMap.WorkEffortActivityStatus}</td>
+        <td>${uiLabelMap.WorkEffortMyStatus}</td>
+        <#-- <td>${uiLabelMap.PartyPartyId}</td> -->
+        <td>${uiLabelMap.PartyRoleId}</td>
+        <td>${uiLabelMap.WorkEffortActivityName}</td>
+        <td>${uiLabelMap.CommonEdit}</td>
       </tr>
+      <#assign alt_row = false>
+      <#list roleActivities as workEffort>
+        <tr<#if alt_row> class="alternate-row"</#if>>
+          <td>${(workEffort.estimatedStartDate.toString())?if_exists}</td>
+          <td>${workEffort.priority?if_exists}</td>
+          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</td>
+          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId"))).get("description",locale))?if_exists}</td>
+          <#-- <td>${workEffort.partyId}</td> -->
+          <td>${workEffort.roleTypeId}</td>
+          <td><a href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortName}</a></td>
+          <td class="button-col"><a href="<@ofbizUrl>acceptRoleAssignment?workEffortId=${workEffort.workEffortId}&partyId=${workEffort.partyId}&roleTypeId=${workEffort.roleTypeId}&fromDate=${workEffort.fromDate.toString()}</@ofbizUrl>">${uiLabelMap.WorkEffortAcceptAssignment}&nbsp;[${workEffort.workEffortId}]</a></td>
+        </tr>
+        <#assign alt_row = !alt_row>
+      </#list>
+    </table>
   </#if>
   <#if (groupActivities.size() > 0)>
-      <tr>
-        <td width="100%">
-          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxbottom">
-            <tr>
-              <td>
-                  <h3>${uiLabelMap.WorkEffortWorkflowActivitiesUserGroup}</h3>
-                  <table width="100%" cellpadding="2" cellspacing="0" border="0">
-                    <tr>
-                      <td><div class="tabletext"><b>${uiLabelMap.CommonStartDateTime}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortPriority}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortActivityStatus}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortMyStatus}</b></div></td>
-                      <td><div class="tabletext"><b>${uiLabelMap.PartyGroupPartyId}</b></div></td>
-                      <#-- <td><div class="tabletext"><b>${uiLabelMap.PartyRoleId}</b></div></td> -->
-                      <td><div class="tabletext"><b>${uiLabelMap.WorkEffortActivityName}</b></div></td>
-                      <td align="right"><div class="tabletext"><b>${uiLabelMap.CommonEdit}</b></div></td>
-                    </tr>
-                    <tr><td colspan="8"><HR class="sepbar"></td></tr>
-                    <#list groupActivities as workEffort>
-                      <tr>
-                        <td><div class="tabletext">${(workEffort.estimatedStartDate.toString())?if_exists}</div></td>
-                        <td><div class="tabletext">${workEffort.priority?if_exists}</div></td>
-                        <td><div class="tabletext">${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</div></td>
-                        <td><div class="tabletext">${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId"))).get("description",locale))?if_exists}</div></td>
-                        <td><div class="tabletext">${workEffort.groupPartyId}</div></td>
-                        <#-- <td><div class="tabletext">${workEffort.roleTypeId}</div></td> -->
-                        <td><A class="buttontext" href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">
-                            ${workEffort.workEffortName}</a></div></td>
-                        <td align="right"><A class="buttontext" href="<@ofbizUrl>acceptassignment?workEffortId=${workEffort.workEffortId}&partyId=${workEffort.partyId}&roleTypeId=${workEffort.roleTypeId}&fromDate=${workEffort.fromDate}</@ofbizUrl>">
-                            ${uiLabelMap.WorkEffortAcceptAssignment}&nbsp;[${workEffort.workEffortId}]</a></div></td>
-                      </tr>
-                    </#list>
-                  </table>
-              </td>
-            </tr>
-          </table>
-        </td>
+    <h3>${uiLabelMap.WorkEffortWorkflowActivitiesUserGroup}</h3>
+    <table class="basic-table hover-bar" cellspacing="0">
+      <tr class="header-row">
+        <td>${uiLabelMap.CommonStartDateTime}</td>
+        <td>${uiLabelMap.WorkEffortPriority}</td>
+        <td>${uiLabelMap.WorkEffortActivityStatus}</td>
+        <td>${uiLabelMap.WorkEffortMyStatus}</td>
+        <td>${uiLabelMap.PartyGroupPartyId}</td>
+        <#-- <td>${uiLabelMap.PartyRoleId}</td> -->
+        <td>${uiLabelMap.WorkEffortActivityName}</td>
+        <td>${uiLabelMap.CommonEdit}</td>
       </tr>
+      <#assign alt_row = false>
+      <#list groupActivities as workEffort>
+        <tr<#if alt_row> class="alternate-row"</#if>>
+          <td>${(workEffort.estimatedStartDate.toString())?if_exists}</td>
+          <td>${workEffort.priority?if_exists}</td>
+          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</td>
+          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId"))).get("description",locale))?if_exists}</td>
+          <td>${workEffort.groupPartyId}</td>
+          <#-- <td>${workEffort.roleTypeId}</td> -->
+          <td><a href="<@ofbizUrl>WorkEffortSummary?workEffortId=${workEffort.workEffortId}</@ofbizUrl>">${workEffort.workEffortName}</a></td>
+          <td class="button-col"><a href="<@ofbizUrl>acceptassignment?workEffortId=${workEffort.workEffortId}&partyId=${workEffort.partyId}&roleTypeId=${workEffort.roleTypeId}&fromDate=${workEffort.fromDate}</@ofbizUrl>">${uiLabelMap.WorkEffortAcceptAssignment}&nbsp;[${workEffort.workEffortId}]</a></td>
+        </tr>
+        <#assign alt_row = !alt_row>
+      </#list>
+    </table>
   </#if>
-</table>
+</div>