mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-14 09:58:16 +01:00
small useability fix in the month view
This commit is contained in:
parent
6f08e22c39
commit
8f98d50ab8
@ -368,6 +368,21 @@
|
|||||||
{
|
{
|
||||||
$m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
|
$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']))
|
if (!$this->bo->printer_friendly || ($this->bo->printer_friendly && @$this->bo->prefs['calendar']['display_minicals']))
|
||||||
{
|
{
|
||||||
$minical_prev = $this->mini_calendar(
|
$minical_prev = $this->mini_calendar(
|
||||||
@ -375,7 +390,8 @@
|
|||||||
'day' => 1,
|
'day' => 1,
|
||||||
'month' => $this->bo->month - 1,
|
'month' => $this->bo->month - 1,
|
||||||
'year' => $this->bo->year,
|
'year' => $this->bo->year,
|
||||||
'link' => 'day'
|
'link' => 'day',
|
||||||
|
'outside_month' => False
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -384,7 +400,8 @@
|
|||||||
'day' => 1,
|
'day' => 1,
|
||||||
'month' => $this->bo->month + 1,
|
'month' => $this->bo->month + 1,
|
||||||
'year' => $this->bo->year,
|
'year' => $this->bo->year,
|
||||||
'link' => 'day'
|
'link' => 'day',
|
||||||
|
'outside_month' => False
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -397,12 +414,16 @@
|
|||||||
if (!$this->bo->printer_friendly)
|
if (!$this->bo->printer_friendly)
|
||||||
{
|
{
|
||||||
$printer = '';
|
$printer = '';
|
||||||
|
$prev_month_link = '<a href="'.$this->page('month','&year='.$prevyear.'&month='.$prev).'"><<</a>';
|
||||||
|
$next_month_link = '<a href="'.$this->page('month','&year='.$nextyear.'&month='.$next).'">>></a>';
|
||||||
$param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1';
|
$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>';
|
$print = '<a href="'.$this->page('month'.$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$printer = '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">';
|
$printer = '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">';
|
||||||
|
$prev_month_link = '';
|
||||||
|
$next_month_link = '';
|
||||||
$print = '';
|
$print = '';
|
||||||
$GLOBALS['phpgw_info']['flags']['nofooter'] = True;
|
$GLOBALS['phpgw_info']['flags']['nofooter'] = True;
|
||||||
}
|
}
|
||||||
@ -413,8 +434,10 @@
|
|||||||
'printer_friendly' => $printer,
|
'printer_friendly' => $printer,
|
||||||
'bg_text' => $this->theme['bg_text'],
|
'bg_text' => $this->theme['bg_text'],
|
||||||
'small_calendar_prev' => $minical_prev,
|
'small_calendar_prev' => $minical_prev,
|
||||||
|
'prev_month_link' => $prev_month_link,
|
||||||
'month_identifier' => lang(strftime("%B",$m)).' '.$this->bo->year,
|
'month_identifier' => lang(strftime("%B",$m)).' '.$this->bo->year,
|
||||||
'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner),
|
'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner),
|
||||||
|
'next_month_link' => $next_month_link,
|
||||||
'small_calendar_next' => $minical_next,
|
'small_calendar_next' => $minical_next,
|
||||||
'large_month' => $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner),
|
'large_month' => $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner),
|
||||||
'print' => $print
|
'print' => $print
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
<!-- $Id$ -->
|
<!-- $Id$ -->
|
||||||
{printer_friendly}
|
{printer_friendly}
|
||||||
<table border="0" width="100%">
|
<table border="0" width="100%" cols="5">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" valign="top">
|
<td align="left" valign="top" width="20%">
|
||||||
{small_calendar_prev}
|
{small_calendar_prev}
|
||||||
</td>
|
</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="+2" color="#000000"><b>{month_identifier}</b></font>
|
||||||
<font size="+1" color="#000000"><br>{username}</font>
|
<font size="+1" color="#000000"><br>{username}</font>
|
||||||
</td>
|
</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}
|
{small_calendar_next}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user