aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/views/default/river
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 03:25:25 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 03:25:25 +0000
commitd4e4268d11612408e4989a5c57f69fcb2febe8aa (patch)
tree2b3b041a5f4e17bea674a44f07c3df5c7f3811dd /mod/bookmarks/views/default/river
parentb232f52a5273a44e28de239cbacc1e4e4b8cc8b3 (diff)
downloadelgg-d4e4268d11612408e4989a5c57f69fcb2febe8aa.tar.gz
elgg-d4e4268d11612408e4989a5c57f69fcb2febe8aa.tar.bz2
Refs #2680: First pass at porting the 1.7 bookmarks to 1.8. Functional, but code is still messy.
git-svn-id: http://code.elgg.org/elgg/trunk@7998 36083f99-b078-4883-b0ff-0f9b5a30f544
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.php39
2 files changed, 17 insertions, 32 deletions
diff --git a/mod/bookmarks/views/default/river/object/bookmarks/annotate.php b/mod/bookmarks/views/default/river/object/bookmarks/annotate.php
new file mode 100644
index 000000000..8db8a6581
--- /dev/null
+++ b/mod/bookmarks/views/default/river/object/bookmarks/annotate.php
@@ -0,0 +1,10 @@
+<?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 bd07db089..82ea75af7 100644
--- a/mod/bookmarks/views/default/river/object/bookmarks/create.php
+++ b/mod/bookmarks/views/default/river/object/bookmarks/create.php
@@ -1,35 +1,10 @@
<?php
-/**
- * Bookmarks river view.
- */
+$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+$object = get_entity($vars['item']->object_guid);
+$url = $object->getURL();
-$object = $vars['item']->getObjectEntity();
-$excerpt = strip_tags($object->description);
-$excerpt = elgg_get_excerpt($excerpt);
+$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>";
-$params = array(
- 'href' => $object->address,
- '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));
-}
-
-echo elgg_echo('bookmarks:river:create');
-
-echo " $link $group_string";
-
-if ($excerpt) {
- echo '<div class="elgg-river-content">';
- echo $excerpt;
- echo '</div>';
-}
+echo $string;