aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar/show_events.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-07-20 05:45:54 +0200
committerSem <sembrestels@riseup.net>2012-07-20 05:45:54 +0200
commit3ac2c8fd0cacc57b8080be5f7d381b8cf5524f2f (patch)
tree46475df7579e0bf12c7bff62c3e125b16c641247 /views/default/event_calendar/show_events.php
parent6e3d519f4ff1e163fe698607adba1568386d8c55 (diff)
parent86d154541f9cf1de74f79cae6c1b05b3214bdca8 (diff)
downloadelgg-3ac2c8fd0cacc57b8080be5f7d381b8cf5524f2f.tar.gz
elgg-3ac2c8fd0cacc57b8080be5f7d381b8cf5524f2f.tar.bz2
Merge branch 'full' of https://github.com/kevinjardine/Elgg-Event-Calendar
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;