diff options
author | Kevin Jardine <kevinjardine@yahoo.com> | 2012-05-29 12:35:20 +0200 |
---|---|---|
committer | Kevin Jardine <kevinjardine@yahoo.com> | 2012-05-29 12:35:20 +0200 |
commit | f22f6fd7a985b773bce95accf5172cdc2524575c (patch) | |
tree | e2c26e20d53772895cff9fb1128b12185b1ae90a /models | |
parent | b8c3767f8c790febb35141919936d616d3ebe2d4 (diff) | |
download | elgg-f22f6fd7a985b773bce95accf5172cdc2524575c.tar.gz elgg-f22f6fd7a985b773bce95accf5172cdc2524575c.tar.bz2 |
added lightbox support for full calendar events
Diffstat (limited to 'models')
-rw-r--r-- | models/model.php | 20 |
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']), ); |