mini-cal days not in current month are controlled as a parameter. Turned them off for year.php page.

This commit is contained in:
skeeter 2001-04-23 00:04:38 +00:00
parent bc379b8c59
commit 46668ced72
2 changed files with 14 additions and 10 deletions

View File

@ -618,7 +618,7 @@ class calendar extends calendar_
}
}
function mini_calendar($day,$month,$year,$link='',$buttons="none")
function mini_calendar($day,$month,$year,$link='',$buttons="none",$outside_month=True)
{
global $phpgw, $phpgw_info, $view;
@ -734,14 +734,18 @@ class calendar extends calendar_
}
else
{
// $p->set_var('day_image','');
// $p->set_var('bgcolor2','#FEFEFE');
// $p->set_var('dayname','');
$p->set_var('bgcolor2','#FEFEFE');
$p->set_var('dayname','<a href="'.$phpgw->link('/calendar/'.$link,'year='.$cal['year'].'&month='.$cal['month'].'&day='.$cal['day']).'" class="minicalendargrey">'.$cal['day'].'</a>');
if($outside_month == True)
{
$p->set_var('bgcolor2','#FEFEFE');
$p->set_var('dayname','<a href="'.$phpgw->link('/calendar/'.$link,'year='.$cal['year'].'&month='.$cal['month'].'&day='.$cal['day']).'" class="minicalendargrey">'.$cal['day'].'</a>');
}
else
{
$p->set_var('day_image','');
$p->set_var('bgcolor2','#FEFEFE');
$p->set_var('dayname','');
}
}
$p->parse('monthweek_day','mini_day',True);
}
$p->parse('display_monthweek','mini_week',True);

View File

@ -68,9 +68,9 @@
for($i=1;$i<13;$i++) {
echo '<td valign="top">';
if(!$friendly)
echo $phpgw->calendar->mini_calendar($i,$i,$year,'day.php');
echo $phpgw->calendar->mini_calendar($i,$i,$year,'day.php','none',False);
else
echo $phpgw->calendar->mini_calendar($i,$i,$year);
echo $phpgw->calendar->mini_calendar($i,$i,$year,'','none',False);
echo '</td>';
if($i==6) echo '</tr><tr valign="top">';
}