aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar/agenda_view.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2011-06-28 23:13:49 -0700
committerKevin Jardine <kevinjardine@yahoo.com>2011-06-28 23:13:49 -0700
commit0a013cd9833a20d3b6334d80dba581bbbb2ce756 (patch)
treebad977e423a6d1193d362295611fe4472c2373af /views/default/event_calendar/agenda_view.php
parent1dd01c7ff9685995b4bc9de0ceeb7856086c3f40 (diff)
parent29792a9858484266952a53268e4fd0dd29b2f4a5 (diff)
downloadelgg-0a013cd9833a20d3b6334d80dba581bbbb2ce756.tar.gz
elgg-0a013cd9833a20d3b6334d80dba581bbbb2ce756.tar.bz2
Merge pull request #1 from cash/master
moved code into base directory
Diffstat (limited to 'views/default/event_calendar/agenda_view.php')
-rw-r--r--views/default/event_calendar/agenda_view.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/views/default/event_calendar/agenda_view.php b/views/default/event_calendar/agenda_view.php
new file mode 100644
index 000000000..bb693def0
--- /dev/null
+++ b/views/default/event_calendar/agenda_view.php
@@ -0,0 +1,34 @@
+<?php
+$nav = elgg_view('navigation/pagination',array(
+
+// 'baseurl' => $_SERVER['REQUEST_URI'],
+ 'baseurl' => $_SERVER['SCRIPT_NAME'].'/?'.$_SERVER['QUERY_STRING'],
+ 'offset' => $vars['offset'],
+ 'count' => $vars['count'],
+ 'limit' => $vars['limit'],
+
+ ));
+$event_calendar_times = get_plugin_setting('times', 'event_calendar');
+$events = $vars['events'];
+$html = '';
+$date_format = 'j M Y';
+$current_date = '';
+if ($events) {
+ foreach($events as $event) {
+ $date = date($date_format,$event->start_date);
+ if ($date != $current_date) {
+ if ($html) {
+ $html .= elgg_view('event_calendar/agenda_footer');
+ }
+ $html .= elgg_view('event_calendar/agenda_header',array('date'=>$date));
+
+ $current_date = $date;
+ }
+ $html .= elgg_view('event_calendar/agenda_item_view',array('event'=>$event,'times'=>$event_calendar_times));
+ }
+ $html .= elgg_view('event_calendar/agenda_footer');
+}
+$html = $nav.'<div class="event_calendar_agenda">'.$html.'</div>'.$nav;
+
+echo $html;
+?> \ No newline at end of file