aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar/show_events.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-04-03 12:31:42 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2012-04-03 12:31:42 +0200
commit0b25adcd921149b50845647980284e8ab66d8fed (patch)
tree0702f1ef157f0417cd1c17ba711f76e563e299ef /views/default/event_calendar/show_events.php
parent2d19bfa232be5eff43bb6c1d1eef12e681552956 (diff)
downloadelgg-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.php12
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;