diff options
author | Kevin Jardine <kevinjardine@yahoo.com> | 2012-02-02 16:19:37 +0100 |
---|---|---|
committer | Kevin Jardine <kevinjardine@yahoo.com> | 2012-02-02 16:19:37 +0100 |
commit | e0e9ff33a7f5fc334af8127fc8680925ce967d14 (patch) | |
tree | 6384673db77ca63065fbf72cedf236ba5fb081c8 /views/default/widgets/event_calendar | |
parent | 5aadcdd48153b4197c44bdacfc504ebd7db34c3f (diff) | |
download | elgg-e0e9ff33a7f5fc334af8127fc8680925ce967d14.tar.gz elgg-e0e9ff33a7f5fc334af8127fc8680925ce967d14.tar.bz2 |
added support for new personal calendar management options
Diffstat (limited to 'views/default/widgets/event_calendar')
-rw-r--r-- | views/default/widgets/event_calendar/content.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/views/default/widgets/event_calendar/content.php b/views/default/widgets/event_calendar/content.php new file mode 100644 index 000000000..329046cb0 --- /dev/null +++ b/views/default/widgets/event_calendar/content.php @@ -0,0 +1,39 @@ +<?php + +/** + * Elgg event calendar widget + * + * @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 + * @link http://radagast.biz/ + * + */ + + // Load event calendar model + elgg_load_library('elgg:event_calendar'); + + //the number of events to display + $num = (int) $vars['entity']->num_display; + if (!$num) + $num = 5; + + // Get the events + + $events = event_calendar_get_personal_events_for_user(elgg_get_page_owner_guid(),$num); + + // If there are any events to view, view them + if (is_array($events) && sizeof($events) > 0) { + + echo "<div id=\"widget_calendar\">"; + + foreach($events as $event) { + echo elgg_view("object/event_calendar",array('entity' => $event)); + } + + echo "</div>"; + + } + +?>
\ No newline at end of file |