small useability fix in the month view

This commit is contained in:
Carsten Wolff 2003-11-07 16:32:23 +00:00
parent 6f08e22c39
commit 8f98d50ab8
2 changed files with 36 additions and 7 deletions

View File

@ -368,6 +368,21 @@
{
$m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
$next = $this->bo->month + 1;
$prev = $this->bo->month - 1;
$nextyear = $this->bo->year;
$prevyear = $this->bo->year;
if ($this->bo->month == 12)
{
$next = 1;
$nextyear = $nextyear + 1;
}
elseif ($this->bo->month == 1)
{
$prev = 12;
$prevyear = $prevyear - 1;
}
if (!$this->bo->printer_friendly || ($this->bo->printer_friendly && @$this->bo->prefs['calendar']['display_minicals']))
{
$minical_prev = $this->mini_calendar(
@ -375,16 +390,18 @@
'day' => 1,
'month' => $this->bo->month - 1,
'year' => $this->bo->year,
'link' => 'day'
'link' => 'day',
'outside_month' => False
)
);
$minical_next = $this->mini_calendar(
Array(
'day' => 1,
'month' => $this->bo->month + 1,
'year' => $this->bo->year,
'link' => 'day'
'link' => 'day',
'outside_month' => False
)
);
}
@ -397,12 +414,16 @@
if (!$this->bo->printer_friendly)
{
$printer = '';
$prev_month_link = '<a href="'.$this->page('month','&year='.$prevyear.'&month='.$prev).'">&lt;&lt;</a>';
$next_month_link = '<a href="'.$this->page('month','&year='.$nextyear.'&month='.$next).'">&gt;&gt;</a>';
$param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1';
$print = '<a href="'.$this->page('month'.$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
}
else
{
$printer = '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">';
$prev_month_link = '';
$next_month_link = '';
$print = '';
$GLOBALS['phpgw_info']['flags']['nofooter'] = True;
}
@ -413,8 +434,10 @@
'printer_friendly' => $printer,
'bg_text' => $this->theme['bg_text'],
'small_calendar_prev' => $minical_prev,
'prev_month_link' => $prev_month_link,
'month_identifier' => lang(strftime("%B",$m)).' '.$this->bo->year,
'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner),
'next_month_link' => $next_month_link,
'small_calendar_next' => $minical_next,
'large_month' => $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner),
'print' => $print

View File

@ -1,15 +1,21 @@
<!-- $Id$ -->
{printer_friendly}
<table border="0" width="100%">
<table border="0" width="100%" cols="5">
<tr>
<td align="left" valign="top">
<td align="left" valign="top" width="20%">
{small_calendar_prev}
</td>
<td align="middle">
<td align="center" valign="middle" width="20%">
<b>{prev_month_link}</b>
</td>
<td align="center" width="20%">
<font size="+2" color="#000000"><b>{month_identifier}</b></font>
<font size="+1" color="#000000"><br>{username}</font>
</td>
<td align="right" valign="top">
<td align="center" valign="middle" width="20%">
{next_month_link}
</td>
<td align="right" valign="top" width="20%">
{small_calendar_next}
</td>
</tr>