diff options
author | Kevin Jardine <kevinjardine@yahoo.com> | 2011-06-28 23:13:49 -0700 |
---|---|---|
committer | Kevin Jardine <kevinjardine@yahoo.com> | 2011-06-28 23:13:49 -0700 |
commit | 0a013cd9833a20d3b6334d80dba581bbbb2ce756 (patch) | |
tree | bad977e423a6d1193d362295611fe4472c2373af /views/default/object/event_calendar.php | |
parent | 1dd01c7ff9685995b4bc9de0ceeb7856086c3f40 (diff) | |
parent | 29792a9858484266952a53268e4fd0dd29b2f4a5 (diff) | |
download | elgg-0a013cd9833a20d3b6334d80dba581bbbb2ce756.tar.gz elgg-0a013cd9833a20d3b6334d80dba581bbbb2ce756.tar.bz2 |
Merge pull request #1 from cash/master
moved code into base directory
Diffstat (limited to 'views/default/object/event_calendar.php')
-rw-r--r-- | views/default/object/event_calendar.php | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/views/default/object/event_calendar.php b/views/default/object/event_calendar.php new file mode 100644 index 000000000..70560bd2d --- /dev/null +++ b/views/default/object/event_calendar.php @@ -0,0 +1,66 @@ +<?php + +/** + * Elgg event_calendar object view + * + * @package event_calendar + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Kevin Jardine <kevin@radagast.biz> + * @copyright Radagast Solutions 2008 + * @link http://radagast.biz/ + * + */ + +$event = $vars['entity']; + + +if ($vars['full']) { + $body = elgg_view('event_calendar/strapline',$vars); + $event_items = event_calendar_get_formatted_full_items($event); + $body .= '<div class="contentWrapper" >'; + + foreach($event_items as $item) { + $value = $item->value; + if (!empty($value)) { + + //This function controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + $body .= "<p class=\"{$even_odd}\"><b>"; + $body .= $item->title.':</b> '; + $body .= $item->value; + + } + } + echo $body; + if ($event->long_description) { + echo '<p>'.$event->long_description.'</p>'; + } else { + echo '<p>'.$event->description.'</p>'; + } + echo '</div>'; + if (get_plugin_setting('add_to_group_calendar', 'event_calendar') == 'yes') { + echo elgg_view('event_calendar/forms/add_to_group',array('event' => $event)); + } +} else { + $time_bit = event_calendar_get_formatted_time($event); + $icon = elgg_view( + "graphics/icon", array( + 'entity' => $vars['entity'], + 'size' => 'small', + ) + ); + $info .= '<p><b><a href="'.$event->getUrl().'">'.$event->title.'</a></b>'; + $info .= '<br />'.$time_bit; + if ($event->description) { + $info .= '<br /><br />'.$event->description; + } + + if ($event_calendar_venue_view = get_plugin_setting('venue_view', 'event_calendar') == 'yes') { + $info .= '<br />'.$event->venue; + } + $info .= '</p>'; + + echo elgg_view_listing($icon, $info); +} + +?>
\ No newline at end of file |