From ad54e40e2b2aede586f27efb94c9a29516c7f00f Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 29 May 2008 12:42:47 +0000 Subject: Added friends pages and related functionality git-svn-id: https://code.elgg.org/elgg/trunk@754 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/views/default/profile/menu.php | 33 ++++++++++ mod/profile/views/default/profile/userdetails.php | 78 +++++++++++++++++++++++ mod/profile/views/default/user/user.php | 65 +------------------ 3 files changed, 113 insertions(+), 63 deletions(-) create mode 100644 mod/profile/views/default/profile/menu.php create mode 100644 mod/profile/views/default/profile/userdetails.php (limited to 'mod/profile/views') diff --git a/mod/profile/views/default/profile/menu.php b/mod/profile/views/default/profile/menu.php new file mode 100644 index 000000000..463301398 --- /dev/null +++ b/mod/profile/views/default/profile/menu.php @@ -0,0 +1,33 @@ + + * @copyright Curverider Ltd 2008 + * @link http://elgg.com/ + * + * @uses $vars['entity'] The user entity + */ + + if (isloggedin() && $vars['entity']->getGUID() != $vars['user']->getGUID()) { + + if ($vars['entity']->isFriend()) { + + echo "

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

"; + + } else { + + echo "

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

"; + + } + + echo "

 

"; + + } + +?> +

name) ?>

+

name) ?>

\ No newline at end of file diff --git a/mod/profile/views/default/profile/userdetails.php b/mod/profile/views/default/profile/userdetails.php new file mode 100644 index 000000000..c405e78a9 --- /dev/null +++ b/mod/profile/views/default/profile/userdetails.php @@ -0,0 +1,78 @@ + + * @copyright Curverider Ltd 2008 + * @link http://elgg.com/ + * + * @uses $vars['entity'] The user entity + */ + + if ($vars['full'] == true) { + $iconsize = "large"; + } else { + $iconsize = "medium"; + } + echo elgg_view( + "profile/icon", array( + 'entity' => $vars['entity'], + 'align' => "right", + 'size' => $iconsize, + ) + ); + +?> +

name; ?>

+ +

+

description); ?>

+ profile) && sizeof($vars['config']->profile) > 0) + foreach($vars['config']->profile as $shortname => $valtype) { + if ($shortname != "description") { + $value = $vars['entity']->$shortname; + if (!empty($value)) { + + ?> + +

+ : + $vars['entity']->$shortname)); + + ?> + +

+ + canEdit()) { + + ?> +

+ +

+ \ No newline at end of file diff --git a/mod/profile/views/default/user/user.php b/mod/profile/views/default/user/user.php index 102932233..345a8aabb 100644 --- a/mod/profile/views/default/user/user.php +++ b/mod/profile/views/default/user/user.php @@ -12,67 +12,6 @@ * @uses $vars['entity'] The user entity */ - if ($vars['full'] == true) { - $iconsize = "large"; - } else { - $iconsize = "medium"; - } - echo elgg_view( - "profile/icon", array( - 'entity' => $vars['entity'], - 'align' => "right", - 'size' => $iconsize, - ) - ); - -?> -

name; ?>

- -

-

description); ?>

- profile) && sizeof($vars['config']->profile) > 0) - foreach($vars['config']->profile as $shortname => $valtype) { - if ($shortname != "description") { - $value = $vars['entity']->$shortname; - if (!empty($value)) { - - ?> - -

- : - $vars['entity']->$shortname)); - - ?> - -

- - canEdit()) { - - ?> -

- -

- \ No newline at end of file +?> \ No newline at end of file -- cgit v1.2.3