aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/views/default/river/object/bookmarks/create.php
blob: 32434471bf4773c597f96e9dc41d9232fbf28017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
 * Elgg bookmark river entry view
 */

$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
$object = get_entity($vars['item']->object_guid);
$is_group = get_entity($object->container_guid);
$url = $object->getURL();
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$string = elgg_echo("bookmarks:river:created", array($url)) . " ";
$string .= "<a href=\"" . $object->address . "\">" . $object->title . "</a>";
if (($is_group instanceof ElggGroup) && (elgg_get_context() != 'groups')){
	$string .= " " . elgg_echo('bookmarks:ingroup') . " <a href=\"{$is_group->getURL()}\">" . $is_group->name . "</a>";
}
$string .= " <span class='entity_subtext'>" . elgg_view_friendly_time($object->time_created);
if (isloggedin()){
	$string .= "<a class='river_comment_form_button link'>Comment</a>";
	$string .= elgg_view('likes/forms/link', array('entity' => $object));
}
$string .= "</span>";
echo $string;