aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/annotation/annotatelike.php11
-rw-r--r--views/default/river/annotation/likes/create.php23
2 files changed, 23 insertions, 11 deletions
diff --git a/views/default/annotation/annotatelike.php b/views/default/annotation/annotatelike.php
deleted file mode 100644
index 7b0d5c2e2..000000000
--- a/views/default/annotation/annotatelike.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
-$performed_by = get_entity($vars['item']->subject_guid);
-$object = get_entity($vars['item']->object_guid);
-$url = $object->getURL();
-$title = $object->title;
-
-$string = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a> ";
-$string .= elgg_echo("likes:river:annotate") . " <a href=\"{$object->getURL()}\">" . $title . "</a> <span class='entity-subtext'>" . elgg_view_friendly_time($object->time_created)."</span>";
-
-echo $string; \ No newline at end of file
diff --git a/views/default/river/annotation/likes/create.php b/views/default/river/annotation/likes/create.php
new file mode 100644
index 000000000..374f4a381
--- /dev/null
+++ b/views/default/river/annotation/likes/create.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Likes river view
+ */
+$object = $vars['item']->getObjectEntity();
+$comment = $vars['item']->getAnnotation();
+
+$url = $object->getURL();
+$title = $object->title;
+if (!$title) {
+ $title = elgg_echo('untitled');
+}
+$params = array(
+ 'href' => $object->getURL(),
+ 'text' => $title,
+);
+$object_link = elgg_view('output/url', $params);
+
+$type = $object->getType();
+$subtype = $object->getSubtype();
+
+$type_string = elgg_echo("river:commented:$type:$subtype");
+echo elgg_echo('river:likes', array($type_string, $object_link));