From 29792a9858484266952a53268e4fd0dd29b2f4a5 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 28 Jun 2011 18:12:41 -0400 Subject: moved the code into the base directory so that it is easier to work with --- views/default/event_calendar/paged_view.php | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 views/default/event_calendar/paged_view.php (limited to 'views/default/event_calendar/paged_view.php') diff --git a/views/default/event_calendar/paged_view.php b/views/default/event_calendar/paged_view.php new file mode 100644 index 000000000..7c2ea2eaa --- /dev/null +++ b/views/default/event_calendar/paged_view.php @@ -0,0 +1,51 @@ + $_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'); +$event_calendar_personal_manage = get_plugin_setting('personal_manage', 'event_calendar'); +$events = $vars['events']; +$html = ''; +$date_format = 'F Y'; +$current_month = ''; +if ($events) { + foreach($events as $event) { + $month = date($date_format,$event->start_date); + if ($month != $current_month) { + if ($html) { + $html .= elgg_view('event_calendar/paged_footer'); + } + $html .= elgg_view('event_calendar/paged_header',array('date'=>$month,'personal_manage'=>$event_calendar_personal_manage)); + + $current_month = $month; + } + $html .= elgg_view('event_calendar/paged_item_view',array('event'=>$event,'times'=>$event_calendar_times,'personal_manage'=>$event_calendar_personal_manage)); + } + $html .= elgg_view('event_calendar/paged_footer'); +} +$msgs = '
'; +$html = $msgs.$nav.'
'.$html.'
'.$nav; + +echo $html; +?> + \ No newline at end of file -- cgit v1.2.3