diff options
Diffstat (limited to 'mod/tabbed_profile/views/default/profile/menu/friendlinks.php')
-rw-r--r-- | mod/tabbed_profile/views/default/profile/menu/friendlinks.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mod/tabbed_profile/views/default/profile/menu/friendlinks.php b/mod/tabbed_profile/views/default/profile/menu/friendlinks.php new file mode 100644 index 000000000..ed13edb8b --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/menu/friendlinks.php @@ -0,0 +1,23 @@ +<?php +/** + * Elgg profile icon avatar menu: Add / Remove friend links + * + * @package ElggProfile + * + * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. + */ +$ts = time(); +$token = generate_action_token($ts); +if ($vars['entity']->isFriend()) { + echo elgg_view('output/confirmlink', array( + 'href' => "action/friends/remove?friend={$vars['entity']->getGUID()}", + 'text' => elgg_echo('friend:remove'), + 'class' => 'remove_friend' + )); +} else { + echo elgg_view('output/confirmlink', array( + 'href' => "action/friends/add?friend={$vars['entity']->getGUID()}", + 'text' => elgg_echo('friend:add'), + 'class' => 'add_friend' + )); +}
\ No newline at end of file |