prev/next links in calendar
This commit is contained in:
parent
9f51233451
commit
bbc65f9832
|
@ -120,7 +120,23 @@ function events_content(&$a) {
|
||||||
if(! $m)
|
if(! $m)
|
||||||
$m = intval($thismonth);
|
$m = intval($thismonth);
|
||||||
|
|
||||||
|
$nextyear = $y;
|
||||||
|
$nextmonth = $m + 1;
|
||||||
|
if($nextmonth > 12) {
|
||||||
|
$nextmonth = 1;
|
||||||
|
$nextyear ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$prevyear = $y;
|
||||||
|
if($m > 1)
|
||||||
|
$prevmonth = $m - 1;
|
||||||
|
else {
|
||||||
|
$prevmonth = 12;
|
||||||
|
$prevyear --;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$o .= '<a href="' . $a->get_baseurl() . '/events/' . $prevyear . '/' . $prevmonth . '" class="prevcal">' . t('<< Previous') . '</a> | <a href="' . $a->get_baseurl() . '/events/' . $nextyear . '/' . $nextmonth . '" class="nextcal">' . t('Next >>') . '</a>';
|
||||||
$o .= cal($y,$m,false, ' eventcal');
|
$o .= cal($y,$m,false, ' eventcal');
|
||||||
|
|
||||||
$dim = get_dim($y,$m);
|
$dim = get_dim($y,$m);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user