aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar/container.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/container.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/container.php')
-rw-r--r--views/default/event_calendar/container.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/views/default/event_calendar/container.php b/views/default/event_calendar/container.php
new file mode 100644
index 000000000..fdd7da2c6
--- /dev/null
+++ b/views/default/event_calendar/container.php
@@ -0,0 +1,24 @@
+<?php
+elgg_load_library('elgg:event_calendar');
+$site_calendar = elgg_get_plugin_setting('site_calendar', 'event_calendar');
+$admin = elgg_is_admin_logged_in();
+$containers = array(0 => elgg_echo('event_calendar:site_calendar'));
+$user = elgg_get_logged_in_user_entity();
+$groups = $user->getGroups('',0,0);
+foreach ($groups as $group) {
+ if (event_calendar_activated_for_group($group)) {
+ if ($admin || !$group_calendar || $group_calendar == 'members') {
+ if ($group->canWriteToContainer($user->guid)) {
+ $containers[$group->guid] = $group->name;
+ }
+ } else if ($group->canEdit()) {
+ $containers[$group->guid] = $group->name;
+ }
+ }
+}
+if ($vars['container_guid']) {
+ $value = $vars['container_guid'];
+} else {
+ $value = 0;
+}
+echo elgg_view('input/dropdown',array('name'=>'group_guid', 'value'=>$vars['container_guid'],'options_values'=>$containers));