diff options
| author | Nick Palmer <nick@sluggardy.net> | 2007-04-06 14:30:10 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2007-04-06 14:30:10 +0000 |
| commit | 36cf21b087452c3ac83f88282094a2ea335a6be8 (patch) | |
| tree | ed879eb92ca79963416cc7b7e608e39ac4171678 | |
| parent | f8166e1b03217658c9b87556c8525684719b0795 (diff) | |
| download | calendar-36cf21b087452c3ac83f88282094a2ea335a6be8.tar.gz calendar-36cf21b087452c3ac83f88282094a2ea335a6be8.tar.bz2 calendar-36cf21b087452c3ac83f88282094a2ea335a6be8.zip | |
Remove event specific code now that we have previews.
| -rw-r--r-- | box.php | 5 | ||||
| -rw-r--r-- | index.php | 14 | ||||
| -rw-r--r-- | templates/calendar_box.tpl | 9 |
3 files changed, 9 insertions, 19 deletions
@@ -1,14 +1,17 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_calendar/box.php,v 1.2 2007/04/05 21:33:07 nickpalmer Exp $ +// $Header: /cvsroot/bitweaver/_bit_calendar/box.php,v 1.3 2007/04/06 14:30:10 nickpalmer Exp $ // Copyright( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. require_once( '../bit_setup_inc.php' ); +global $gContent, $gBitSystem; include_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' ); +$gContent->mInfo['rendered'] = $gContent->getPreview(); + if (!empty($gContent->mInfo['content_type_guid'])) { $gContent->mInfo['content_description'] = $gLibertySystem->mContentTypes[$gContent->mInfo['content_type_guid']]['content_description']; } @@ -1,6 +1,6 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.48 2007/04/06 12:38:44 nickpalmer Exp $ +// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.49 2007/04/06 14:30:10 nickpalmer Exp $ // Copyright( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. @@ -92,16 +92,8 @@ foreach( $calMonth as $w => $week ) { $i = 0; foreach( $bitEvents[$day['day']] as $bitEvent ) { $dayEvents[$i] = $bitEvent; - if (!$gBitSystem->isFeatureActive('calendar_ajax_popups')) { - // This is expensive! Turn on the ajax popups! - if ($bitEvent['content_type_guid'] == 'bitevents' && $gBitSystem->isPackageActive('events')) { - $be->mContentId = $bitEvent['content_id']; - $be->load(); - $gBitSmarty->assign('cellHash', $be->mInfo); - } - else { - $gBitSmarty->assign( 'cellHash', $bitEvent ); - } + if (!$gBitSystem->isFeatureActive('calendar_ajax_popups')) { + $gBitSmarty->assign( 'cellHash', $bitEvent ); $dayEvents[$i]["over"] = $gBitSmarty->fetch( "bitpackage:calendar/calendar_box.tpl" ); } diff --git a/templates/calendar_box.tpl b/templates/calendar_box.tpl index 0fb10bf..a417a5e 100644 --- a/templates/calendar_box.tpl +++ b/templates/calendar_box.tpl @@ -5,13 +5,8 @@ <div class="floaticon"><a onclick="javascript:return cClick();">{biticon ipackage=icons iname=window-close iexplain="Close Popup"}</a></div> {/if} <h3>{$cellHash.title|escape}</h3> - {if $cellHash.content_type_guid == 'bitevents' && $gBitSystem->isPackageActive('events')} - <div class="center"> - {include file="bitpackage:events/render_header_inc.tpl" contentHash=$cellHash} - </div> - {if $gBitSystem->isFeatureActive('calendar_ajax_popups')} - {$cellHash.parsed_data} - {/if} + {if !empty($cellHash.rendered)} + {$cellHash.rendered} {/if} {if $gBitUser->hasPermission('p_calendar_view_changes')} <div class="boxcontent"> |
