aboutsummaryrefslogtreecommitdiff
path: root/views/default/object
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-06-28 18:12:41 -0400
committerCash Costello <cash.costello@gmail.com>2011-06-28 18:12:41 -0400
commit29792a9858484266952a53268e4fd0dd29b2f4a5 (patch)
treebad977e423a6d1193d362295611fe4472c2373af /views/default/object
parent1dd01c7ff9685995b4bc9de0ceeb7856086c3f40 (diff)
downloadelgg-29792a9858484266952a53268e4fd0dd29b2f4a5.tar.gz
elgg-29792a9858484266952a53268e4fd0dd29b2f4a5.tar.bz2
moved the code into the base directory so that it is easier to work with
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