aboutsummaryrefslogtreecommitdiff
path: root/mod/likes/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/likes/views/default')
-rw-r--r--mod/likes/views/default/likes/display.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/mod/likes/views/default/likes/display.php b/mod/likes/views/default/likes/display.php
index 97a0f89d7..cbfe46078 100644
--- a/mod/likes/views/default/likes/display.php
+++ b/mod/likes/views/default/likes/display.php
@@ -2,8 +2,6 @@
/**
* Elgg likes display
*
- * @package Elgg
- *
* @uses $vars['entity']
*/
@@ -42,17 +40,20 @@ if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) {
}
}
+echo $likes_button;
+
$list = '';
$num_of_likes = likes_count($vars['entity']);
+
if ($num_of_likes) {
// display the number of likes
if ($num_of_likes == 1) {
- $likes_string = elgg_echo('likes:userlikedthis');
+ $likes_string = elgg_echo('likes:userlikedthis', array($num_of_likes));
} else {
- $likes_string = elgg_echo('likes:userslikedthis');
+ $likes_string = elgg_echo('likes:userslikedthis', array($num_of_likes));
}
$params = array(
- 'text' => "$num_of_likes $likes_string",
+ 'text' => $likes_string,
'title' => elgg_echo('likes:see'),
'rel' => 'popup',
'href' => "#likes-$guid"
@@ -61,6 +62,5 @@ if ($num_of_likes) {
$list .= "<div class='elgg-module elgg-module-popup elgg-likes-list hidden clearfix' id='likes-$guid'>";
$list .= elgg_list_annotations(array('guid' => $guid, 'annotation_name' => 'likes', 'limit' => 99));
$list .= "</div>";
+ echo $list;
}
-
-echo elgg_view_image_block($likes_button, $list); \ No newline at end of file