From c07218b9c7b256e998f0a31c0226b3bd6d8011d7 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Mon, 27 Jun 2011 12:49:05 +0200 Subject: added main code --- trunk/views/default/event_calendar/agenda_view.php | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 trunk/views/default/event_calendar/agenda_view.php (limited to 'trunk/views/default/event_calendar/agenda_view.php') diff --git a/trunk/views/default/event_calendar/agenda_view.php b/trunk/views/default/event_calendar/agenda_view.php new file mode 100644 index 000000000..bb693def0 --- /dev/null +++ b/trunk/views/default/event_calendar/agenda_view.php @@ -0,0 +1,34 @@ + $_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.'
'.$html.'
'.$nav; + +echo $html; +?> \ No newline at end of file -- cgit v1.2.3