aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/event_calendar.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2011-08-29 20:59:54 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2011-08-29 20:59:54 +0200
commit2557245a41579a15dd960e2033f4d5f39ff566ac (patch)
tree15891d7dcef7c4d5da3ae82eb4f6ae9ad10b2521 /views/default/object/event_calendar.php
parent52ddfd1b76cb3e5fbb2a31eb5a3c738bb0d61b54 (diff)
downloadelgg-2557245a41579a15dd960e2033f4d5f39ff566ac.tar.gz
elgg-2557245a41579a15dd960e2033f4d5f39ff566ac.tar.bz2
first step in rewrite for Elgg 1.8
Diffstat (limited to 'views/default/object/event_calendar.php')
-rw-r--r--views/default/object/event_calendar.php66
1 files changed, 48 insertions, 18 deletions
diff --git a/views/default/object/event_calendar.php b/views/default/object/event_calendar.php
index 70560bd2d..97829e7c2 100644
--- a/views/default/object/event_calendar.php
+++ b/views/default/object/event_calendar.php
@@ -13,11 +13,10 @@
$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" >';
+ $body .= '<br />';
foreach($event_items as $item) {
$value = $item->value;
@@ -28,39 +27,70 @@ if ($vars['full']) {
$body .= "<p class=\"{$even_odd}\"><b>";
$body .= $item->title.':</b> ';
$body .= $item->value;
-
}
}
+ $metadata = elgg_view_menu('entity', array(
+ 'entity' => $event,
+ 'handler' => 'event_calendar',
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+ ));
+
+ $tags = elgg_view('output/tags', array('tags' => $event->event_tags));
+
+ $params = array(
+ 'entity' => $event,
+ 'metadata' => $metadata,
+ 'tags' => $tags,
+ 'title' => false,
+ );
+ $list_body = elgg_view('object/elements/summary', $params);
+ echo $list_body;
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') {
+ if (elgg_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;
+ $icon = '<img src="'.elgg_view("icon/object/event_calendar/small").'" />';
+ $extras = array($time_bit);
if ($event->description) {
- $info .= '<br /><br />'.$event->description;
+ $extras[] = $event->description;
}
- if ($event_calendar_venue_view = get_plugin_setting('venue_view', 'event_calendar') == 'yes') {
- $info .= '<br />'.$event->venue;
+ if ($event_calendar_venue_view = elgg_get_plugin_setting('venue_view', 'event_calendar') == 'yes') {
+ $extras[] = $event->venue;
}
- $info .= '</p>';
+ if ($extras) {
+ $info = "<p>".implode("<br />",$extras)."</p>";
+ } else {
+ $info = '';
+ }
+
+ $metadata = elgg_view_menu('entity', array(
+ 'entity' => $event,
+ 'handler' => 'event_calendar',
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+ ));
+
+ $tags = elgg_view('output/tags', array('tags' => $event->event_tags));
+
+ $params = array(
+ 'entity' => $event,
+ 'metadata' => $metadata,
+ 'subtitle' => $info,
+ 'tags' => $tags,
+ );
+ $list_body = elgg_view('object/elements/summary', $params);
- echo elgg_view_listing($icon, $info);
+ echo elgg_view_image_block($icon, $list_body);
}
?> \ No newline at end of file