From b83f9c0049e084f291aabe22e1aca73144fd481d Mon Sep 17 00:00:00 2001 From: nickw Date: Fri, 21 May 2010 16:36:52 +0000 Subject: Cleaning up profile owner blocks to allow for view extensions. git-svn-id: http://code.elgg.org/elgg/trunk@6126 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/page_elements/owner_block.php | 31 +++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'views') diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php index ef77d6895..9aef07eef 100644 --- a/views/default/page_elements/owner_block.php +++ b/views/default/page_elements/owner_block.php @@ -30,23 +30,28 @@ END; if(is_plugin_enabled('profile')) { // Is there a page owner? $owner = page_owner_entity(); - $location = elgg_view("output/tags",array('value' => $owner->location)); - if ($owner instanceof ElggEntity) { - $icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny')); - if ($owner instanceof ElggUser || $owner instanceof ElggGroup) { - $info = '

' . $owner->name . '

'; - } - $display = "
" . $icon . "
"; - $display .= "
" . $info; + if ($owner instanceof ElggGroup || + ($owner instanceof ElggUser && $owner->getGUID != get_loggedin_userid()) + ) { + $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); + $owner_url = $owner->getURL(); + $display = "
$icon
"; + $display .= '
'; + $display .= "

{$owner->name}

"; if ($owner->briefdescription) { - $desc = $owner->briefdescription; - $display .= "

" . $desc . "

"; + $display .= "

{$owner->briefdescription}

"; } - $display .= "

{$location}

"; - $display .= "
"; // close owner_block_contents + + $location = elgg_view('output/tags', array('value' => $owner->location)); + $display .= "

$location

"; + + $display .= elgg_view('owner_block/profile_extend'); + + // close owner_block_content + $display .= '
'; - $contents .= "
".$display."
"; + $contents .= "
$display
"; } } -- cgit v1.2.3