From 7303fb1a0960e6bb3b6e11f51372d1ed689e3b84 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 19 Dec 2010 03:17:51 +0000 Subject: added a user admin menu that plugins can add menu items to git-svn-id: http://code.elgg.org/elgg/trunk@7678 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/profile/admin_menu.php | 42 -------- .../views/default/profile/hoverover.php | 16 --- mod/tabbed_profile/views/default/profile/icon.php | 111 --------------------- .../views/default/profile/ownerblock.php | 15 ++- 4 files changed, 10 insertions(+), 174 deletions(-) delete mode 100755 mod/tabbed_profile/views/default/profile/admin_menu.php delete mode 100644 mod/tabbed_profile/views/default/profile/hoverover.php delete mode 100644 mod/tabbed_profile/views/default/profile/icon.php (limited to 'mod/tabbed_profile/views/default') diff --git a/mod/tabbed_profile/views/default/profile/admin_menu.php b/mod/tabbed_profile/views/default/profile/admin_menu.php deleted file mode 100755 index 99ed3a4f5..000000000 --- a/mod/tabbed_profile/views/default/profile/admin_menu.php +++ /dev/null @@ -1,42 +0,0 @@ - - - diff --git a/mod/tabbed_profile/views/default/profile/hoverover.php b/mod/tabbed_profile/views/default/profile/hoverover.php deleted file mode 100644 index 172ef5d3d..000000000 --- a/mod/tabbed_profile/views/default/profile/hoverover.php +++ /dev/null @@ -1,16 +0,0 @@ - -
  • - name; ?> -
  • - \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/icon.php b/mod/tabbed_profile/views/default/profile/icon.php deleted file mode 100644 index 71b25fe6c..000000000 --- a/mod/tabbed_profile/views/default/profile/icon.php +++ /dev/null @@ -1,111 +0,0 @@ -name, ENT_QUOTES, 'UTF-8'); - $username = $vars['entity']->username; - - if ($icontime = $vars['entity']->icontime) { - $icontime = "{$icontime}"; - } else { - $icontime = "default"; - } - - // Get size - if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar'))) { - $vars['size'] = 'medium'; - } - - // Get any align and js - if (!empty($vars['align'])) { - $align = " align=\"{$vars['align']}\" "; - } else { - $align = ''; - } - - // Override - if (isset($vars['override']) && $vars['override'] == true) { - $override = true; - } else { - $override = false; - } - // profile avatar drop-down menu - if (!$override) { - ?> -
    -
    - - isBanned())) { - ?> - alt="name, ENT_QUOTES, 'UTF-8'); ?>" title="name, ENT_QUOTES, 'UTF-8'); ?>" style="background: url(getIcon($vars['size']); ?>) no-repeat;" class="" /> - getIcon($vars['size'])); ?>" border="0" alt="name, ENT_QUOTES, 'UTF-8'); ?>" title="name, ENT_QUOTES, 'UTF-8'); ?>" /> - */ - - if (!$override) { - ?> -
    - email; $phone = $user->phone; -//if admin display admin links -if (isadminloggedin()) { - $admin_links = elgg_view('profile/admin_menu'); -} else { - $admin_links = ''; +// if admin display admin links +$admin_links = ''; +if (isadminloggedin() && get_loggedin_userid() != elgg_get_page_owner_guid()) { + $params = array( + 'user' => elgg_get_page_owner(), + 'toggle' => true, + 'sort_by' => 'order', + ); + $admin_links = elgg_view_menu('user_admin', $params); + $admin_links = "
    $admin_links
    "; } -- cgit v1.2.3