aboutsummaryrefslogtreecommitdiff
path: root/views/default/object
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/object')
-rw-r--r--views/default/object/event_calendar.php66
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