aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/views/default/river
diff options
context:
space:
mode:
Diffstat (limited to 'mod/bookmarks/views/default/river')
-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>';
+}