aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/views/default/river/object
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-17 03:27:03 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-17 03:27:03 +0000
commit5a9dfa444ec1807b7b73b9e86fe219a0055731c3 (patch)
tree9476f58ddb2bd277af171b56d191d5d3840b2848 /mod/bookmarks/views/default/river/object
parent52e5df0a088c0b8abd1448547c090da9b967f835 (diff)
downloadelgg-5a9dfa444ec1807b7b73b9e86fe219a0055731c3.tar.gz
elgg-5a9dfa444ec1807b7b73b9e86fe219a0055731c3.tar.bz2
Refs #2680: Bookmarks revamp, part 3: menus and bookmarklet.
git-svn-id: http://code.elgg.org/elgg/trunk@8268 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/bookmarks/views/default/river/object')
-rw-r--r--mod/bookmarks/views/default/river/object/bookmarks/annotate.php10
-rw-r--r--mod/bookmarks/views/default/river/object/bookmarks/create.php40
2 files changed, 33 insertions, 17 deletions
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 @@
-<?php
-$statement = $vars['statement'];
-$performed_by = $statement->getSubject();
-$object = $statement->getObject();
-
-$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
-$string = sprintf(elgg_echo("bookmarks:river:annotate"),$url) . " ";
-$string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("bookmarks:river:item") . "</a>";
-
-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 @@
<?php
-$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
-$object = get_entity($vars['item']->object_guid);
-$url = $object->getURL();
+/**
+ * New bookmarks river entry
+ *
+ * @package Bookmarks
+ */
-$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
-$string = sprintf(elgg_echo("bookmarks:river:created"),$url) . " ";
-$string .= "<a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; //elgg_echo("bookmarks:river:item") . "</a>";
+$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 '<div class="elgg-river-content">';
+ echo $excerpt;
+ echo '</div>';
+}