[Alba-desarrollo] SVN Alba r5146 - prosistem/alba/trunk/alba/apps/principal/modules/cal/actions

commits en pressenter.com.ar commits en pressenter.com.ar
Lun Sep 24 22:39:31 CEST 2007


Author: josx
Date: 2007-09-24 17:39:31 -0300 (Mon, 24 Sep 2007)
New Revision: 5146

Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/cal/actions/components.class.php
Log:
Agregue al component de cal lineas necesarias para mostarar titulo de las semana.

Modified: prosistem/alba/trunk/alba/apps/principal/modules/cal/actions/components.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/cal/actions/components.class.php	2007-09-24 20:28:27 UTC (rev 5145)
+++ prosistem/alba/trunk/alba/apps/principal/modules/cal/actions/components.class.php	2007-09-24 20:39:31 UTC (rev 5146)
@@ -122,17 +122,27 @@
 		$prev_week 			= date("Ymd", strtotime("-1 week",  $unix_time));
 		
 		
-		
 		$globals_local = array();
 		$globals_local['daysofweek_lang'] = $daysofweek_lang;
  		$globals_local['daysofweekshort_lang'] = $daysofweekshort_lang; $globals_local['daysofweekreallyshort_lang'] = $daysofweekreallyshort_lang;
 		$globals_local['monthsofyear_lang'] = $monthsofyear_lang;
 		$globals_local['monthsofyearshort_lang'] = $monthsofyearshort_lang;
-		$display_date = localizeDate($dateFormat_day, $unix_time, $globals_local);
+
+
 		$sidebar_date = localizeDate($dateFormat_week_list, $unix_time, $globals_local);
 		$start_week_time = strtotime(dateOfWeek($getdate, $week_start_day));
+        $end_week_time          = $start_week_time + (($week_length - 1) * 25 * 60 * 60);
+        $start_week         = localizeDate($dateFormat_week, $start_week_time, $globals_local);
+        $end_week           = localizeDate($dateFormat_week, $end_week_time, $globals_local);
+
+        switch($current_view) {
+            case "week": $display_date = "$start_week - $end_week"; break;
+            case "day":
+            case "month":
+            default:
+             $display_date = localizeDate($dateFormat_day, $unix_time, $globals_local); 
+        }
 		
-		
 		// select for calendars
 		/*
 		$list_icals 	= display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED));




Más información sobre la lista de distribución Alba-desarrollo