aboutsummaryrefslogtreecommitdiff
path: root/views/default/profile/hover.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 04:08:54 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 04:08:54 +0000
commitece3f544d55a9918e4e2b6c0759a7faa1570e9ad (patch)
tree90fb8587e8b6e364fdc0642b5ffaf16ab2fa64ca /views/default/profile/hover.php
parent7303fb1a0960e6bb3b6e11f51372d1ed689e3b84 (diff)
downloadelgg-ece3f544d55a9918e4e2b6c0759a7faa1570e9ad.tar.gz
elgg-ece3f544d55a9918e4e2b6c0759a7faa1570e9ad.tar.bz2
cleaned up profile hover menu
git-svn-id: http://code.elgg.org/elgg/trunk@7679 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/profile/hover.php')
-rw-r--r--views/default/profile/hover.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/views/default/profile/hover.php b/views/default/profile/hover.php
new file mode 100644
index 000000000..85d6912ba
--- /dev/null
+++ b/views/default/profile/hover.php
@@ -0,0 +1,63 @@
+<?php
+
+
+$user = $vars['entity'];
+$username = $vars['username'];
+$name = $vars['name'];
+
+?>
+
+<div class="avatar_menu_button"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" border="0" width="15" height="15" /></div>
+<div class="sub_menu">
+ <h3 class="displayname">
+ <a href="<?php echo $user->getURL(); ?>">
+ <?php echo $name; ?>
+ <span class="username">
+ <?php echo "&#64;" . $username; ?>
+ </span>
+ </a>
+ </h3>
+ <ul class='sub_menu_list'>
+<?php
+if (isloggedin()) {
+ // if not looking at your own avatar menu
+ if ($user->getGUID() != get_loggedin_userid()) {
+
+ // Add / Remove friend link
+ $friendlinks = elgg_view('profile/menu/friendlinks',$vars);
+ if (!empty($friendlinks)) {
+ echo "<li class='user_menu_profile'>{$friendlinks}</li>";
+ }
+ // view for plugins to extend
+ echo elgg_view('profile/menu/links',$vars);
+ } else {
+ // if looking at your own avatar menu - provide a couple of handy links
+?>
+ <li class="user_menu_profile">
+ <a class="edit_profile" href="<?php echo elgg_get_site_url()?>pg/profile/<?php echo $username; ?>/edit/details">
+ <?php echo elgg_echo("profile:edit"); ?>
+ </a>
+ </li>
+ <li class="user_menu_profile">
+ <a class="edit_avatar" href="<?php echo elgg_get_site_url()?>pg/profile/<?php echo $username; ?>/edit/icon">
+ <?php echo elgg_echo("profile:editicon"); ?>
+ </a>
+ </li>
+<?php
+ }
+
+ // if Admin is logged in, and not looking at admins own avatar menu
+ if (isadminloggedin() && get_loggedin_userid() != $user->guid) {
+ $params = array(
+ 'user' => $user,
+ 'sort_by' => 'order',
+ );
+ $admin_links = elgg_view_menu('user_admin', $params);
+ if (!empty($admin_links)) {
+ echo "<li class='user_menu_admin'>{$admin_links}</li>";
+ }
+ }
+}
+?>
+ </ul>
+</div> \ No newline at end of file