aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 18:16:54 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 18:16:54 +0000
commit3c083f6c4ff4d354a546e03477e7a4acbb16d4a9 (patch)
tree961ad1135905070b95a51bc0c6bdbd948754b562 /views/default/forms
parent298114995174acf451cc1477fdeec34a42ef608b (diff)
downloadelgg-3c083f6c4ff4d354a546e03477e7a4acbb16d4a9.tar.gz
elgg-3c083f6c4ff4d354a546e03477e7a4acbb16d4a9.tar.bz2
rewrote the display of likes
git-svn-id: http://code.elgg.org/elgg/trunk@7748 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/forms')
-rw-r--r--views/default/forms/likes/edit.php57
1 files changed, 0 insertions, 57 deletions
diff --git a/views/default/forms/likes/edit.php b/views/default/forms/likes/edit.php
deleted file mode 100644
index 93c4ce983..000000000
--- a/views/default/forms/likes/edit.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- * Elgg likes add form
- *
- * @package Elgg
- *
- * @uses $vars['entity']
- */
-
-if (isset($vars['entity']) && isloggedin()) {
- $guid = $vars['entity']->getGUID();
- $url = elgg_get_site_url() . "action/likes/add?guid={$guid}";
-
- //check to see if the user has already liked
- if (!elgg_annotation_exists($guid, 'likes') ) {
- $params = array(
- 'href' => $url,
- 'text' => '<span class="elgg-icon elgg-icon-likes"></span>',
- 'title' => elgg_echo('likes:likethis'),
- 'is_action' => true,
- );
- echo elgg_view('output/url', $params);
- $likes_classname = 'elgg-icon-likes';
- $likes_titletag = "";
- } else {
- $likes_classname = 'elgg-icon-liked';
- $likes_titletag = elgg_echo('likes:remove');
- }
-
- //display the number of likes
- $numoflikes = elgg_count_likes($vars['entity']);
- if ($numoflikes != 0) {
- if ($numoflikes == 1) {
- $user_string = elgg_echo('likes:userlikedthis');
- } else {
- $user_string = elgg_echo('likes:userslikedthis');
- }
-
- $params = array(
- 'href' => $url,
- 'text' => "<span class=\"elgg-icon $likes_classname\"></span>" . elgg_count_likes($vars['entity']) . " " . $user_string,
- 'title' => $likes_titletag,
- 'is_action' => true,
- );
- echo elgg_view('output/url', $params);
-
- //show the users who liked the object
- echo "<div class='likes-list hidden clearfix'>";
- echo list_annotations($vars['entity']->getGUID(), 'likes', 99);
- echo "</div>";
- }
-}
-
-
-
-
-