From 29792a9858484266952a53268e4fd0dd29b2f4a5 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 28 Jun 2011 18:12:41 -0400 Subject: moved the code into the base directory so that it is easier to work with --- views/default/object/event_calendar.php | 66 +++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 views/default/object/event_calendar.php (limited to 'views/default/object/event_calendar.php') 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 @@ + + * @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 .= '
'; + + 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 .= "

"; + $body .= $item->title.': '; + $body .= $item->value; + + } + } + echo $body; + if ($event->long_description) { + echo '

'.$event->long_description.'

'; + } else { + echo '

'.$event->description.'

'; + } + echo '
'; + 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 .= '

'.$event->title.''; + $info .= '
'.$time_bit; + if ($event->description) { + $info .= '

'.$event->description; + } + + if ($event_calendar_venue_view = get_plugin_setting('venue_view', 'event_calendar') == 'yes') { + $info .= '
'.$event->venue; + } + $info .= '

'; + + echo elgg_view_listing($icon, $info); +} + +?> \ No newline at end of file -- cgit v1.2.3