From 4d4e99053912ffa143112919d2752f162789b84d Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 23 Jun 2008 15:39:56 +0000 Subject: new profile links system. git-svn-id: https://code.elgg.org/elgg/trunk@1066 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/profile/hoverover/actions.php | 25 ---------------------- .../views/default/profile/hoverover/links.php | 25 ---------------------- mod/profile/views/default/profile/menu/actions.php | 25 ++++++++++++++++++++++ mod/profile/views/default/profile/menu/links.php | 25 ++++++++++++++++++++++ .../views/default/profile/menu/linksownpage.php | 22 +++++++++++++++++++ mod/profile/views/default/profile/profilelinks.php | 20 +++++++++++++++-- 6 files changed, 90 insertions(+), 52 deletions(-) delete mode 100644 mod/profile/views/default/profile/hoverover/actions.php delete mode 100644 mod/profile/views/default/profile/hoverover/links.php create mode 100644 mod/profile/views/default/profile/menu/actions.php create mode 100644 mod/profile/views/default/profile/menu/links.php create mode 100644 mod/profile/views/default/profile/menu/linksownpage.php (limited to 'mod/profile/views') diff --git a/mod/profile/views/default/profile/hoverover/actions.php b/mod/profile/views/default/profile/hoverover/actions.php deleted file mode 100644 index f69ad1316..000000000 --- a/mod/profile/views/default/profile/hoverover/actions.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @copyright Curverider Ltd 2008 - * @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()) { - if ($vars['entity']->isFriend()) { - echo "

getGUID()}\">" . elgg_echo("friend:remove") . "

"; - } else { - echo "

getGUID()}\">" . elgg_echo("friend:add") . "

"; - } - } - } - -?> \ No newline at end of file diff --git a/mod/profile/views/default/profile/hoverover/links.php b/mod/profile/views/default/profile/hoverover/links.php deleted file mode 100644 index c60de7456..000000000 --- a/mod/profile/views/default/profile/hoverover/links.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - * - * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. - */ - -?> - -

- -

-

- -

-

- -

\ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/actions.php b/mod/profile/views/default/profile/menu/actions.php new file mode 100644 index 000000000..f69ad1316 --- /dev/null +++ b/mod/profile/views/default/profile/menu/actions.php @@ -0,0 +1,25 @@ + + * @copyright Curverider Ltd 2008 + * @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()) { + if ($vars['entity']->isFriend()) { + echo "

getGUID()}\">" . elgg_echo("friend:remove") . "

"; + } else { + echo "

getGUID()}\">" . elgg_echo("friend:add") . "

"; + } + } + } + +?> \ 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 new file mode 100644 index 000000000..c60de7456 --- /dev/null +++ b/mod/profile/views/default/profile/menu/links.php @@ -0,0 +1,25 @@ + + * @copyright Curverider Ltd 2008 + * @link http://elgg.com/ + * + * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. + */ + +?> + +

+ +

+

+ +

+

+ +

\ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/linksownpage.php b/mod/profile/views/default/profile/menu/linksownpage.php new file mode 100644 index 000000000..04f031506 --- /dev/null +++ b/mod/profile/views/default/profile/menu/linksownpage.php @@ -0,0 +1,22 @@ + + * @copyright Curverider Ltd 2008 + * @link http://elgg.com/ + * + * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. + */ + +?> + +

+ +

+

+ +

\ No newline at end of file diff --git a/mod/profile/views/default/profile/profilelinks.php b/mod/profile/views/default/profile/profilelinks.php index c349e7479..fda223a31 100644 --- a/mod/profile/views/default/profile/profilelinks.php +++ b/mod/profile/views/default/profile/profilelinks.php @@ -2,6 +2,8 @@ /** * Elgg profile links + * We need to make sure that the correct links display depending on whether you are looking at your own + * profile or someone else's * * @package ElggProfile * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 @@ -16,7 +18,21 @@ guid == page_owner()){ + + echo "
"; //start the wrapper div + echo elgg_view("profile/menu/actions",$vars);//grab action links such as make friend + echo elgg_view("profile/menu/linksownpage",$vars); // an different view for user's own profile + echo "
"; //close wrapper div + + } else { + + echo "
"; //start the wrapper div + echo elgg_view("profile/menu/actions",$vars); //grab action links such as make friend + echo elgg_view("profile/menu/links",$vars); //passive links to items such as user blog etc + echo "
"; //close wrapper div + + } ?> \ No newline at end of file -- cgit v1.2.3