diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-02 03:03:38 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-02 03:03:38 +0000 |
commit | a2e2d55bee987b5d3f4e8c5b4d64e699543093db (patch) | |
tree | 25d597cdc235bbbeb7d6c3ad77234dba36fe1f2d /views/default/river/item | |
parent | 7656f8620f0b5dc90a245313f9fb1b175d237da4 (diff) | |
download | elgg-a2e2d55bee987b5d3f4e8c5b4d64e699543093db.tar.gz elgg-a2e2d55bee987b5d3f4e8c5b4d64e699543093db.tar.bz2 |
Refs #2895 reverting [8532] as code is not working as intended. Can comment and like everything because menu items are being registered. Perhaps questionable benefit of using the menu system here.
git-svn-id: http://code.elgg.org/elgg/trunk@8566 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/river/item')
-rw-r--r-- | views/default/river/item/controls.php | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/views/default/river/item/controls.php b/views/default/river/item/controls.php index 50c1ae09e..468983329 100644 --- a/views/default/river/item/controls.php +++ b/views/default/river/item/controls.php @@ -13,39 +13,38 @@ if (elgg_is_logged_in()) { if ($vars['item']->annotation_id == 0) { // comments if ($object->canComment()) { - elgg_register_menu_item('river', array( - 'name' => 'comment', + $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')) { - - elgg_register_menu_item('river', array( - 'name' => 'likes', - 'href' => "action/likes/add?guid={$object->getGUID()}", + $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() )); - - elgg_register_menu_item('river', array( - 'href' => "action/likes/delete?annotation_id={$likes[0]->id}", + $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); } } - echo elgg_view_menu('river', array('sort_by' => 'priority', 'item' => $vars['item'])); }
\ No newline at end of file |