aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar/calendar_toggle.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2011-09-26 12:42:11 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2011-09-26 12:42:11 +0200
commit804dfcf6c4b5b6380d607c8ec6b843d56ac82247 (patch)
treecc81ecb76a5f1422100d521b9fe3b93166fcdf3e /views/default/event_calendar/calendar_toggle.php
parent6b20e80c9d577a3eeeb570a6d9fd706fe619709b (diff)
downloadelgg-804dfcf6c4b5b6380d607c8ec6b843d56ac82247.tar.gz
elgg-804dfcf6c4b5b6380d607c8ec6b843d56ac82247.tar.bz2
major changes for Elgg 1.8
Diffstat (limited to 'views/default/event_calendar/calendar_toggle.php')
-rw-r--r--views/default/event_calendar/calendar_toggle.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/views/default/event_calendar/calendar_toggle.php b/views/default/event_calendar/calendar_toggle.php
new file mode 100644
index 000000000..7180dec75
--- /dev/null
+++ b/views/default/event_calendar/calendar_toggle.php
@@ -0,0 +1,20 @@
+<?php
+$event = $vars['event_calendar_event'];
+$user = $vars['entity'];
+$container = get_entity($event->container_guid);
+
+if ($container->canEdit()) {
+ $link = '<p class="event-calendar-personal-calendar-toggle"><a href="javascript:void(0);" ';
+ $link .= 'onclick="javascript:event_calendar_personal_toggle('.$event->guid.','.$vars['entity']->guid.'); return false;" ';
+ $link .= ' >';
+ $link .= '<span id="event_calendar_user_data_'.$vars['entity']->guid.'">'.elgg_echo('event_calendar:remove_from_the_calendar').'</span>';
+ $link .= '</a></p>';
+
+ $button = elgg_view('input/button',array(
+ 'id'=>'event_calendar_user_data_'.$event->guid.'_'.$user->guid,
+ 'class' => "event-calendar-personal-calendar-toggle",
+ 'value' => elgg_echo('event_calendar:remove_from_the_calendar_button'),
+ ));
+}
+
+echo '<div class="event-calendar-personal-calendar-toggle-wrapper">'.$button.'<div>';