blob: ab1227609fd14a57e92035de059a0ef96b0637d3 (
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
34
35
36
37
38
|
<?php
/**
* Body of river item
*
* @uses $vars[item]
*/
$item = $vars[item];
$subject = $item->getSubjectEntity();
$object = $item->getObjectEntity();
// 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));
if ($object->getType() == 'object' && $vars['item']->annotation_id == 0) {
$body .= '<div></div>';
$body .= "<a class='river-comment-form-button link'>Comment</a>";
$body .= elgg_view('forms/likes/link', array('entity' => $object));
}
// footer
$footer = elgg_view('riverdashboard/river/footer', $vars);
$params = array(
'header' => $header,
'body' => $body,
'footer' => $footer,
'show_inner' => false,
);
echo elgg_view('layout/objects/module', $params);
|