aboutsummaryrefslogtreecommitdiff
path: root/views/default/river/elements/body.php
blob: f9ecbc03c5c5a18396749b4a3d82f32feee391cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?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 = elgg_view_menu('river', array('item' => $item, 'sort_by' => 'priority'));
$header .= "$subject_link <span class=\"elgg-river-timestamp\">$timestamp</span>";

// body
$body = elgg_view($item->getView(), array('item' => $item));

// footer
$footer = elgg_view('river/elements/footer', $vars);

echo elgg_view('page/components/module', array(
	'header' => $header,
	'body' => $body,
	'footer' => $footer,
	'class' => 'mbn',
));