From 5a9dfa444ec1807b7b73b9e86fe219a0055731c3 Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 17 Feb 2011 03:27:03 +0000 Subject: Refs #2680: Bookmarks revamp, part 3: menus and bookmarklet. git-svn-id: http://code.elgg.org/elgg/trunk@8268 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../default/river/object/bookmarks/annotate.php | 10 ------ .../default/river/object/bookmarks/create.php | 40 ++++++++++++++++++---- 2 files changed, 33 insertions(+), 17 deletions(-) delete mode 100644 mod/bookmarks/views/default/river/object/bookmarks/annotate.php (limited to 'mod/bookmarks/views/default/river') diff --git a/mod/bookmarks/views/default/river/object/bookmarks/annotate.php b/mod/bookmarks/views/default/river/object/bookmarks/annotate.php deleted file mode 100644 index 8db8a6581..000000000 --- a/mod/bookmarks/views/default/river/object/bookmarks/annotate.php +++ /dev/null @@ -1,10 +0,0 @@ -getSubject(); -$object = $statement->getObject(); - -$url = "getURL()}\">{$performed_by->name}"; -$string = sprintf(elgg_echo("bookmarks:river:annotate"),$url) . " "; -$string .= "getURL() . "\">" . elgg_echo("bookmarks:river:item") . ""; - -echo $string; \ No newline at end of file diff --git a/mod/bookmarks/views/default/river/object/bookmarks/create.php b/mod/bookmarks/views/default/river/object/bookmarks/create.php index 82ea75af7..743efdb22 100644 --- a/mod/bookmarks/views/default/river/object/bookmarks/create.php +++ b/mod/bookmarks/views/default/river/object/bookmarks/create.php @@ -1,10 +1,36 @@ subject_guid); // $statement->getSubject(); -$object = get_entity($vars['item']->object_guid); -$url = $object->getURL(); +/** + * New bookmarks river entry + * + * @package Bookmarks + */ -$url = "getURL()}\">{$performed_by->name}"; -$string = sprintf(elgg_echo("bookmarks:river:created"),$url) . " "; -$string .= "getURL() . "\">" . $object->title . ""; //elgg_echo("bookmarks:river:item") . ""; +$object = $vars['item']->getObjectEntity(); +$excerpt = elgg_get_excerpt($object->description); -echo $string; +$params = array( + 'href' => $object->getURL(), + 'text' => $object->title, +); +$link = elgg_view('output/url', $params); + +$group_string = ''; +$container = $object->getContainerEntity(); +if ($container instanceof ElggGroup) { + $params = array( + 'href' => $container->getURL(), + 'text' => $container->name, + ); + $group_link = elgg_view('output/url', $params); + $group_string = elgg_echo('river:ingroup', array($group_link)); +} + +$link = elgg_echo('bookmarks:river:created', array($link)); + +echo " $link $group_string"; + +if ($excerpt) { + echo '
'; + echo $excerpt; + echo '
'; +} -- cgit v1.2.3