From 0b25adcd921149b50845647980284e8ab66d8fed Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Tue, 3 Apr 2012 12:31:42 +0200 Subject: major changes to add new features, including a full calendar and repeating events --- views/default/event_calendar/show_events.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'views/default/event_calendar/show_events.php') diff --git a/views/default/event_calendar/show_events.php b/views/default/event_calendar/show_events.php index 63d722247..3a484e756 100644 --- a/views/default/event_calendar/show_events.php +++ b/views/default/event_calendar/show_events.php @@ -10,16 +10,21 @@ * */ +elgg_load_library('elgg:event_calendar'); + $listing_format = $vars['listing_format']; if ($vars['events']) { if ($listing_format == 'agenda') { + $vars['events'] = event_calendar_flatten_event_structure($vars['events']); $event_list = elgg_view('event_calendar/agenda_view',$vars); } else if ($listing_format == 'paged') { + $vars['events'] = event_calendar_flatten_event_structure($vars['events']); $event_list = elgg_view('event_calendar/paged_view',$vars); } else if ($listing_format == 'full') { $event_list = elgg_view('event_calendar/full_calendar_view',$vars); } else { + $vars['events'] = event_calendar_flatten_event_structure($vars['events']); $options = array( 'list_class' => 'elgg-list-entity', 'full_view' => FALSE, @@ -32,7 +37,12 @@ if ($vars['events']) { $event_list = elgg_view_entity_list($vars['events'], $options); } } else { - $event_list = '

'.elgg_echo('event_calendar:no_events_found').'

'; + if ($listing_format == 'full') { + // show the empty calendar + $event_list = elgg_view('event_calendar/full_calendar_view',$vars); + } else { + $event_list = '

'.elgg_echo('event_calendar:no_events_found').'

'; + } } if ($listing_format == 'paged' || $listing_format == 'full') { echo $event_list; -- cgit v1.2.3