[Vtigercrm-commits] [vtiger-commits] r6360 - /vtigercrm/trunk/modules/Calendar/calendarLayout.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed May 24 10:52:09 EDT 2006
Author: saraj
Date: Wed May 24 08:52:05 2006
New Revision: 6360
Log:
changes made to display event in yearview and minicalendar
Modified:
vtigercrm/trunk/modules/Calendar/calendarLayout.php
Modified: vtigercrm/trunk/modules/Calendar/calendarLayout.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/calendarLayout.php (original)
+++ vtigercrm/trunk/modules/Calendar/calendarLayout.php Wed May 24 08:52:05 2006
@@ -58,6 +58,7 @@
function get_mini_calendar(& $cal)
{
+ //echo '<pre>';print_r($cal);echo '</pre>';
global $current_user,$adb;
$count = 0;
if ($cal['calendar']->month_array[$cal['calendar']->slices[35]]->start_time->month != $cal['calendar']->date_time->month) {
@@ -83,7 +84,8 @@
$minical .= '<th>'.$weekday.'</th>';
}
$minical .= "</tr>";
-
+ $event_class = '';
+ $class = '';
for ($i = 0; $i < $rows; $i ++)
{
$minical .= "<tr>";
@@ -91,7 +93,19 @@
{
$cal['slice'] = $cal['calendar']->month_array[$cal['calendar']->slices[$count]];
$class = dateCheck($cal['slice']->start_time->get_formatted_date());
- $minical .= "<td class=".$class.">";
+ if(count($cal['slice']->activities) != 0 && ($cal['slice']->start_time->get_formatted_date() == $cal['slice']->activities[0]->start_time->get_formatted_date()))
+ {
+ $event_class = 'class="eventDay"';
+ }
+ else
+ {
+ $event_class = '';
+ }
+ if($class != '' )
+ $class = 'class="'.$class.'"';
+ else
+ $class = $event_class;
+ $minical .= "<td ".$class.">";
$minical .= "<a href='index.php?module=Calendar&action=index&view=".$cal['slice']->getView()."&".$cal['slice']->start_time->get_date_str()."'>";
if ($cal['slice']->start_time->getMonth() == $cal['calendar']->date_time->getMonth())
{
@@ -689,10 +703,28 @@
for ($mr = 0; $mr < 7; $mr ++)
{
list($_1styear,$_1stmonth,$_1stdate) = explode("-",$cal['calendar']->month_day_slices[$count][$cnt]);
+ if(count($cal['slice']->activities) != 0)
+ {
+ for($act_count = 0;$act_count<count($cal['slice']->activities);$act_count++)
+ {
+ if($cal['calendar']->month_day_slices[$count][$cnt] == $cal['slice']->activities[$act_count]->start_time->get_formatted_date())
+ $event_class = 'class="eventDay"';
+ else
+ $event_class = '';
+ }
+ }
+ $class = dateCheck($cal['calendar']->month_day_slices[$count][$cnt]);
+ if($class != '')
+ {
+ $class = 'class="'.$class.'"';
+ }
+ else
+ {
+ $class = $event_class;
+ }
$date = $_1stdate + 0;
$month = $_1stmonth + 0;
- $class = dateCheck($cal['calendar']->month_day_slices[$count][$cnt]);
- $yearview_layout .= '<td class="'.$class.'">';
+ $yearview_layout .= '<td '.$class.''.$event_class.'>';
if($rows == 6 && $k==0)
{
list($tempyear,$tempmonth,$tempdate) = explode("-",$cal['calendar']->month_day_slices[$count][35+$mr]);
More information about the vtigercrm-commits
mailing list