blob: bb693def0204aef54502bde110e548eb081e62a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?php
$nav = elgg_view('navigation/pagination',array(
// 'baseurl' => $_SERVER['REQUEST_URI'],
'baseurl' => $_SERVER['SCRIPT_NAME'].'/?'.$_SERVER['QUERY_STRING'],
'offset' => $vars['offset'],
'count' => $vars['count'],
'limit' => $vars['limit'],
));
$event_calendar_times = get_plugin_setting('times', 'event_calendar');
$events = $vars['events'];
$html = '';
$date_format = 'j M Y';
$current_date = '';
if ($events) {
foreach($events as $event) {
$date = date($date_format,$event->start_date);
if ($date != $current_date) {
if ($html) {
$html .= elgg_view('event_calendar/agenda_footer');
}
$html .= elgg_view('event_calendar/agenda_header',array('date'=>$date));
$current_date = $date;
}
$html .= elgg_view('event_calendar/agenda_item_view',array('event'=>$event,'times'=>$event_calendar_times));
}
$html .= elgg_view('event_calendar/agenda_footer');
}
$html = $nav.'<div class="event_calendar_agenda">'.$html.'</div>'.$nav;
echo $html;
?>
|