aboutsummaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-05-29 12:35:20 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2012-05-29 12:35:20 +0200
commitf22f6fd7a985b773bce95accf5172cdc2524575c (patch)
treee2c26e20d53772895cff9fb1128b12185b1ae90a /models
parentb8c3767f8c790febb35141919936d616d3ebe2d4 (diff)
downloadelgg-f22f6fd7a985b773bce95accf5172cdc2524575c.tar.gz
elgg-f22f6fd7a985b773bce95accf5172cdc2524575c.tar.bz2
added lightbox support for full calendar events
Diffstat (limited to 'models')
-rw-r--r--models/model.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/models/model.php b/models/model.php
index 7de514802..b53471a44 100644
--- a/models/model.php
+++ b/models/model.php
@@ -1855,7 +1855,7 @@ function event_calendar_generate_listing_params($page_type,$container_guid,$orig
return $params;
}
-function event_calendar_get_page_content_view($event_guid) {
+function event_calendar_get_page_content_view($event_guid,$light_box = FALSE) {
// add personal calendar button and links
elgg_push_context('event_calendar:view');
$event = get_entity($event_guid);
@@ -1885,12 +1885,16 @@ function event_calendar_get_page_content_view($event_guid) {
$content .= elgg_view_comments($event);
}
}
-
- $params = array('title' => $title, 'content' => $content,'filter' => '');
-
- $body = elgg_view_layout("content", $params);
-
- return elgg_view_page($title,$body);
+
+ if ($light_box) {
+ return '<div class="event-calendar-lightbox">'.elgg_view_title($title).$content.'</div>';
+ } else {
+ $params = array('title' => $title, 'content' => $content,'filter' => '');
+
+ $body = elgg_view_layout("content", $params);
+
+ return elgg_view_page($title,$body);
+ }
}
function event_calendar_get_page_content_display_users($event_guid) {
@@ -2135,7 +2139,7 @@ function event_calendar_get_page_content_fullcalendar_events($start_date,$end_da
'id' => $event->guid,
'guid' => $event->guid,
'title' => $event->title,
- 'url' => $event->getURL(),
+ 'url' => elgg_get_site_url().'event_calendar/view_light_box/'.$event->guid,
'start' => date('c',$ed['start_time']),
'end' => date('c',$ed['end_time']),
);