aboutsummaryrefslogtreecommitdiff
path: root/trunk/views/default/object/event_calendar.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2011-06-27 12:49:05 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2011-06-27 12:49:05 +0200
commitc07218b9c7b256e998f0a31c0226b3bd6d8011d7 (patch)
treeb13c83d01bf4cb488a783a4b65cdfc9837bdc514 /trunk/views/default/object/event_calendar.php
parent446a0679509f2206cbf26f4a795fe0468b715f64 (diff)
downloadelgg-c07218b9c7b256e998f0a31c0226b3bd6d8011d7.tar.gz
elgg-c07218b9c7b256e998f0a31c0226b3bd6d8011d7.tar.bz2
added main code
Diffstat (limited to 'trunk/views/default/object/event_calendar.php')
-rw-r--r--trunk/views/default/object/event_calendar.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/trunk/views/default/object/event_calendar.php b/trunk/views/default/object/event_calendar.php
new file mode 100644
index 000000000..70560bd2d
--- /dev/null
+++ b/trunk/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