aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar/show_events.php
blob: 63d722247d3908a2aa5b7a4abdbb59e72e13ba75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
 * Elgg show events view
 * 
 * @package event_calendar
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Kevin Jardine <kevin@radagast.biz>
 * @copyright Radagast Solutions 2008-12
 * @link http://radagast.biz/
 * 
 */

$listing_format = $vars['listing_format'];

if ($vars['events']) {
	if ($listing_format == 'agenda') {
		$event_list = elgg_view('event_calendar/agenda_view',$vars);
	} else if ($listing_format == 'paged') {
		$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 {
		$options = array(
			'list_class' => 'elgg-list-entity',
			'full_view' => FALSE,
			'pagination' => TRUE,
			'list_type' => 'listing',
			'list_type_toggle' => FALSE,
			'offset' => $vars['offset'],
			'limit' => $vars['limit'],
		);
		$event_list = elgg_view_entity_list($vars['events'], $options);
	}
} else {
	$event_list = '<p>'.elgg_echo('event_calendar:no_events_found').'</p>';
}
if ($listing_format == 'paged' || $listing_format == 'full') {
	echo $event_list;
} else {
?>
<div style="width:100%">
<div id="event_list" style="float:left;">
<?php
echo $event_list;
?>
</div>
<div style="float:right;">
<?php
echo elgg_view('event_calendar/calendar',$vars);
?>
</div>
</div>
<?php
}