This commit is contained in:
skeeter 2001-04-18 17:27:02 +00:00
parent ff565921fc
commit 40485b6fc2
3 changed files with 32 additions and 7 deletions

View File

@ -616,7 +616,7 @@ class calendar extends calendar_
}
}
function mini_calendar($day,$month,$year,$link='')
function mini_calendar($day,$month,$year,$link='',$buttons="none")
{
global $phpgw, $phpgw_info, $view;
@ -648,18 +648,43 @@ class calendar extends calendar_
}
$var = Array(
'img_root' => $this->phpgwapi_template_dir,
'cal_img_root' => $this->image_dir,
'bgcolor' => $phpgw_info['theme']['bg_color'],
'bgcolor1' => $phpgw_info['theme']['bg_color'],
'month' => $month,
'prevmonth' => $phpgw->link('/calendar/month.php','date='.$month_ago.'&owner='.$this->owner),
'nextmonth' => $phpgw->link('/calendar/month.php','date='.$month_ahead.'&owner='.$this->owner),
'bgcolor2' => $phpgw_info['theme']['cal_dayview']
);
$p->set_var($var);
switch(strtolower($buttons))
{
case 'right':
$var = Array(
'nextmonth' => '<a href="'.$phpgw->link('/calendar/month.php','date='.$month_ahead.'&owner='.$this->owner).'"><img src="'.$this->phpgwapi_template_dir.'/right.gif" border="0"></a>'
);
break;
case 'left':
$var = Array(
'prevmonth' => '<a href="'.$phpgw->link('/calendar/month.php','date='.$month_ago.'&owner='.$this->owner).'"><img src="'.$this->phpgwapi_template_dir.'/left.gif" border="0"></a>'
);
break;
case 'both':
$var = Array(
'prevmonth' => '<a href="'.$phpgw->link('/calendar/month.php','date='.$month_ago.'&owner='.$this->owner).'"><img src="'.$this->phpgwapi_template_dir.'/left.gif" border="0"></a>',
'nextmonth' => '<a href="'.$phpgw->link('/calendar/month.php','date='.$month_ahead.'&owner='.$this->owner).'"><img src="'.$this->phpgwapi_template_dir.'/right.gif" border="0"></a>'
);
break;
case 'none':
default:
$var = Array(
'prevmonth' => '',
'nextmonth' => ''
);
break;
}
$p->set_var($var);
for($i=0;$i<7;$i++)
{
$p->set_var('dayname','<b>' . substr(lang($this->days[$i]),0,2) . '</b>');

View File

@ -19,7 +19,7 @@
<table border="0" cellspacing="0" cellpadding="0" valign="top" bgcolor="{bgcolor}" width="46%">
<tr valign="center" bgcolor="{bgcolor}">
<td align="left" colspan="5"><font size="-2">&nbsp;&nbsp;&nbsp;&nbsp;<b>{month}</b></font></td>
<td align="right" colspan="2"><a href="{prevmonth}"><img src="{img_root}/left.gif" border="0"></a>&nbsp;&nbsp;<a href="{nextmonth}"><img src="{img_root}/right.gif" border="0"></a></td>
<td align="right" colspan="2">{prevmonth}&nbsp;&nbsp;{nextmonth}</td>
</tr>
<tr>
<td bgcolor="{bgcolor}" align="center" colspan="7"><img src="{cal_img_root}/mini-calendar-bar.gif" width="90%" height="5"></td>

View File

@ -19,7 +19,7 @@
<table border="0" cellspacing="0" cellpadding="0" valign="top" bgcolor="{bgcolor}" width="46%">
<tr valign="center" bgcolor="{bgcolor}">
<td align="left" colspan="5"><font size="-2">&nbsp;&nbsp;&nbsp;&nbsp;<b>{month}</b></font></td>
<td align="right" colspan="2"><a href="{prevmonth}"><img src="{img_root}/left.gif" border="0"></a>&nbsp;&nbsp;<a href="{nextmonth}"><img src="{img_root}/right.gif" border="0"></a></td>
<td align="right" colspan="2">{prevmonth}&nbsp;&nbsp;{nextmonth}</td>
</tr>
<tr>
<td bgcolor="{bgcolor}" align="center" colspan="7"><img src="{cal_img_root}/mini-calendar-bar.gif" width="90%" height="5"></td>