From bdb5d2b95792782ebc379e3348cad1812c1980b4 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 9 Mar 2011 03:07:40 +0000 Subject: Fixes #3058 pulls likes out as a plugin git-svn-id: http://code.elgg.org/elgg/trunk@8639 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/likes/views/default/annotation/likes.php | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 mod/likes/views/default/annotation/likes.php (limited to 'mod/likes/views/default/annotation') diff --git a/mod/likes/views/default/annotation/likes.php b/mod/likes/views/default/annotation/likes.php new file mode 100644 index 000000000..e1ae20818 --- /dev/null +++ b/mod/likes/views/default/annotation/likes.php @@ -0,0 +1,48 @@ +getOwnerEntity(); +if (!$user) { + return true; +} + +$user_icon = elgg_view_entity_icon($user, 'tiny'); +$user_link = elgg_view('output/url', array( + 'href' => $user->getURL(), + 'text' => $user->name, +)); + +$likes_string = elgg_echo('likes:this'); + +$friendlytime = elgg_view_friendly_time($like->time_created); + +if ($like->canEdit()) { + $delete_button = elgg_view("output/confirmlink",array( + 'href' => "action/likes/delete?annotation_id={$like->id}", + 'text' => "", + 'confirm' => elgg_echo('deleteconfirm'), + 'text_encode' => false, + )); +} + +$body = << + $delete_button + $user_link $likes_string + + $friendlytime + +

+HTML; + +echo elgg_view_image_block($user_icon, $body); -- cgit v1.2.3