aboutsummaryrefslogtreecommitdiff
path: root/views/default/river/elements/body.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/river/elements/body.php')
-rw-r--r--views/default/river/elements/body.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/views/default/river/elements/body.php b/views/default/river/elements/body.php
new file mode 100644
index 000000000..7d36222ac
--- /dev/null
+++ b/views/default/river/elements/body.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Body of river item
+ *
+ * @uses $vars['item']
+ */
+
+$item = $vars['item'];
+$subject = $item->getSubjectEntity();
+
+// river item header
+$params = array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+);
+$subject_link = elgg_view('output/url', $params);
+$timestamp = elgg_get_friendly_time($item->getPostedTime());
+$header = "$subject_link <span class=\"elgg-river-timestamp\">$timestamp</span>";
+
+// body
+$body = elgg_view($item->getView(), array('item' => $item));
+
+// footer
+$footer = elgg_view('river/item/footer', $vars);
+
+echo elgg_view('page/components/module', array(
+ 'header' => $header,
+ 'body' => $body,
+ 'footer' => $footer,
+ 'show_inner' => false,
+)); \ No newline at end of file