diff options
author | Kevin Jardine <kevinjardine@yahoo.com> | 2012-04-03 12:31:42 +0200 |
---|---|---|
committer | Kevin Jardine <kevinjardine@yahoo.com> | 2012-04-03 12:31:42 +0200 |
commit | 0b25adcd921149b50845647980284e8ab66d8fed (patch) | |
tree | 0702f1ef157f0417cd1c17ba711f76e563e299ef /views/default/event_calendar/show_events.php | |
parent | 2d19bfa232be5eff43bb6c1d1eef12e681552956 (diff) | |
download | elgg-0b25adcd921149b50845647980284e8ab66d8fed.tar.gz elgg-0b25adcd921149b50845647980284e8ab66d8fed.tar.bz2 |
major changes to add new features, including a full calendar and repeating events
Diffstat (limited to 'views/default/event_calendar/show_events.php')
-rw-r--r-- | views/default/event_calendar/show_events.php | 12 |
1 files changed, 11 insertions, 1 deletions
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 = '<p>'.elgg_echo('event_calendar:no_events_found').'</p>'; + if ($listing_format == 'full') { + // show the empty calendar + $event_list = elgg_view('event_calendar/full_calendar_view',$vars); + } else { + $event_list = '<p>'.elgg_echo('event_calendar:no_events_found').'</p>'; + } } if ($listing_format == 'paged' || $listing_format == 'full') { echo $event_list; |