From a140ef9c53edb2e249eab2eafccc6eb8c0952dab Mon Sep 17 00:00:00 2001 From: pete Date: Mon, 22 Mar 2010 13:31:19 +0000 Subject: Updated avatar menu: Removed links to tools, provided a view to extend menu, added @username to menu, cleaned-up and simplified menu generation. git-svn-id: http://code.elgg.org/elgg/trunk@5467 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/views/default/profile/css.php | 20 +++-- mod/profile/views/default/profile/icon.php | 92 +++++++++++++--------- mod/profile/views/default/profile/menu/actions.php | 32 -------- .../views/default/profile/menu/adminwrapper.php | 17 ---- .../views/default/profile/menu/friendlinks.php | 27 +++++++ mod/profile/views/default/profile/menu/links.php | 21 +---- .../views/default/profile/menu/linksownpage.php | 29 ------- .../default/profile/profile_contents/widgets.php | 0 .../views/default/profile/profile_ownerblock.php | 4 +- mod/profile/views/default/profile/submenu.php | 22 ------ 10 files changed, 97 insertions(+), 167 deletions(-) delete mode 100644 mod/profile/views/default/profile/menu/actions.php delete mode 100644 mod/profile/views/default/profile/menu/adminwrapper.php create mode 100644 mod/profile/views/default/profile/menu/friendlinks.php delete mode 100644 mod/profile/views/default/profile/menu/linksownpage.php delete mode 100644 mod/profile/views/default/profile/profile_contents/widgets.php delete mode 100644 mod/profile/views/default/profile/submenu.php (limited to 'mod/profile/views/default') diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php index ed5b050b3..7a82b2bec 100644 --- a/mod/profile/views/default/profile/css.php +++ b/mod/profile/views/default/profile/css.php @@ -352,8 +352,8 @@ p.visit_twitter a { width:164px; background:#FFFFFF; text-align:left; - -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); /* safari v3+ */ - -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); /* FF v3.5+ */ + -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); + -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); } div.usericon a.icon img { z-index:10; @@ -367,17 +367,21 @@ div.usericon a.icon img { background:#cccccc; text-decoration:none; } -.usericon .sub_menu h3 { - font-size:1.3em; - line-height: 1.1em; +.usericon .sub_menu h3.displayname { + font-size:1.3em !important; /* make sure nothing overrides our sub menu h3 */ + line-height: 1.1em !important; padding:0 !important; margin:0 !important; - border-bottom:solid 1px #dddddd; - color: #4690d6; + border-bottom:solid 1px #dddddd !important; } -.usericon .sub_menu h3 a { +.usericon .sub_menu h3.displayname a { padding:3px 3px 3px 8px; } +.usericon .sub_menu h3.displayname a .username { + display:block; + font-weight: normal; + font-size: 0.8em; +} .usericon .sub_menu a { padding:2px 3px 2px 8px; } diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php index 83015766a..d5623e0c8 100644 --- a/mod/profile/views/default/profile/icon.php +++ b/mod/profile/views/default/profile/icon.php @@ -43,49 +43,67 @@ if ($vars['entity'] instanceof ElggUser) { // Override if (isset($vars['override']) && $vars['override'] == true) { $override = true; - } else $override = false; - + } else { + $override = false; + } + // profile avatar drop-down menu if (!$override) { - -?> -
-
- - - isBanned())) { - ?>"> +
+
+ isBanned())) { + ?> alt="name, ENT_QUOTES, 'UTF-8'); ?>" title="name, ENT_QUOTES, 'UTF-8'); ?>" /> -
- - + + - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. - */ - -if (isloggedin()) { - if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) { - $ts = time(); - $token = generate_action_token($ts); - if ($vars['entity']->isFriend()) { - echo elgg_view('output/confirmlink', array( - 'href' => "{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}", - 'text' => elgg_echo('friend:remove'), - 'class' => 'user_menu_removefriend' - )); - } else { - echo elgg_view('output/confirmlink', array( - 'href' => "{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}", - 'text' => elgg_echo('friend:add'), - 'class' => 'user_menu_addfriend' - )); - } - } -} \ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/adminwrapper.php b/mod/profile/views/default/profile/menu/adminwrapper.php deleted file mode 100644 index eec5a6d3f..000000000 --- a/mod/profile/views/default/profile/menu/adminwrapper.php +++ /dev/null @@ -1,17 +0,0 @@ -{$adminlinks}"; -} \ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/friendlinks.php b/mod/profile/views/default/profile/menu/friendlinks.php new file mode 100644 index 000000000..f7ca3c2fd --- /dev/null +++ b/mod/profile/views/default/profile/menu/friendlinks.php @@ -0,0 +1,27 @@ + + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + * + * @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' => "{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}", + 'text' => elgg_echo('friend:remove'), + 'class' => 'remove_friend' + )); +} else { + echo elgg_view('output/confirmlink', array( + 'href' => "{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}", + 'text' => elgg_echo('friend:add'), + 'class' => 'add_friend' + )); +} \ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/links.php b/mod/profile/views/default/profile/menu/links.php index fd04e2e99..de2b28926 100644 --- a/mod/profile/views/default/profile/menu/links.php +++ b/mod/profile/views/default/profile/menu/links.php @@ -1,6 +1,6 @@ - -
  • - -
  • -canEdit()){ -?> -
  • - -
  • - -
  • - -
  • -
  • - -
  • diff --git a/mod/profile/views/default/profile/menu/linksownpage.php b/mod/profile/views/default/profile/menu/linksownpage.php deleted file mode 100644 index 2d41c6c31..000000000 --- a/mod/profile/views/default/profile/menu/linksownpage.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. - */ -?> -canEdit()){ -?> -
  • - -
  • - -
  • - -
  • -
  • - -
  • - diff --git a/mod/profile/views/default/profile/profile_contents/widgets.php b/mod/profile/views/default/profile/profile_contents/widgets.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/mod/profile/views/default/profile/profile_ownerblock.php b/mod/profile/views/default/profile/profile_ownerblock.php index 7f89d3782..4a6622fc8 100755 --- a/mod/profile/views/default/profile/profile_ownerblock.php +++ b/mod/profile/views/default/profile/profile_ownerblock.php @@ -31,8 +31,8 @@ if($section == 'details'){ $profile_actions = ""; if(get_loggedin_user()->getGuid() == page_owner()){ $profile_actions = "
    "; - $profile_actions .= "username}/edit/details' class='action_button'>Edit profile"; - $profile_actions .= "username}/edit/icon' class='action_button'>Edit profile icon"; + $profile_actions .= "username}/edit/details' class='action_button'>". elgg_echo('profile:edit') .""; + $profile_actions .= "username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') .""; $profile_actions .= "
    "; }else{ $profile_actions = "
    "; diff --git a/mod/profile/views/default/profile/submenu.php b/mod/profile/views/default/profile/submenu.php deleted file mode 100644 index 682b910c2..000000000 --- a/mod/profile/views/default/profile/submenu.php +++ /dev/null @@ -1,22 +0,0 @@ - - - \ No newline at end of file -- cgit v1.2.3