aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-06 00:04:42 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-06 00:04:42 +0000
commit38e7d84f89340e6e0ffb40323b2c86770cf9fe4e (patch)
tree473abf8ef1ceb20c7a1e3e63b506cffb033efdd7 /views
parentda5dd299925f4ff1a63b1dd45e34c3bdf81c01dc (diff)
downloadelgg-38e7d84f89340e6e0ffb40323b2c86770cf9fe4e.tar.gz
elgg-38e7d84f89340e6e0ffb40323b2c86770cf9fe4e.tar.bz2
Fixes #2895 river menu reimplemented using plugin hook
git-svn-id: http://code.elgg.org/elgg/trunk@8607 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/river/item/controls.php44
1 files changed, 1 insertions, 43 deletions
diff --git a/views/default/river/item/controls.php b/views/default/river/item/controls.php
index 468983329..d3f8c6fc0 100644
--- a/views/default/river/item/controls.php
+++ b/views/default/river/item/controls.php
@@ -2,49 +2,7 @@
/**
* Controls on an river item
*
- *
* @uses $vars['item']
*/
-$object = $vars['item']->getObjectEntity();
-
-if (elgg_is_logged_in()) {
- // comments and non-objects cannot be commented on or liked
- if ($vars['item']->annotation_id == 0) {
- // comments
- if ($object->canComment()) {
- $params = array(
- 'href' => "#comments-add-$object->guid",
- 'text' => elgg_echo('generic_comments:text'),
- 'class' => "elgg-toggler",
- );
- echo elgg_view('output/url', $params);
- }
-
- // like this
- if ($object->canAnnotate(0, 'likes')) {
- if (!elgg_annotation_exists($object->getGUID(), 'likes')) {
- $url = "action/likes/add?guid={$object->getGUID()}";
- $params = array(
- 'href' => $url,
- 'text' => elgg_echo('likes:likethis'),
- 'is_action' => true,
- );
- } else {
- $likes = elgg_get_annotations(array(
- 'guid' => $guid,
- 'annotation_name' => 'likes',
- 'owner_guid' => elgg_get_logged_in_user_guid()
- ));
- $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}";
- $params = array(
- 'href' => $url,
- 'text' => elgg_echo('likes:remove'),
- 'is_action' => true,
- );
- }
- echo elgg_view('output/url', $params);
- }
- }
-
-} \ No newline at end of file
+echo elgg_view_menu('river', array('item' => $vars['item']));