aboutsummaryrefslogtreecommitdiff
path: root/views/default/page_elements
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-21 16:36:52 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-21 16:36:52 +0000
commitb83f9c0049e084f291aabe22e1aca73144fd481d (patch)
treefdd3dc9d87b5b55e16cfe64e1d128d186d43ec9d /views/default/page_elements
parent23b38301a25d603ba66d74e9a791af5eb3685cc2 (diff)
downloadelgg-b83f9c0049e084f291aabe22e1aca73144fd481d.tar.gz
elgg-b83f9c0049e084f291aabe22e1aca73144fd481d.tar.bz2
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
Diffstat (limited to 'views/default/page_elements')
-rw-r--r--views/default/page_elements/owner_block.php31
1 files changed, 18 insertions, 13 deletions
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 = '<h3><a href="' . $owner->getURL() . '">' . $owner->name . '</a></h3>';
- }
- $display = "<div class='owner_block_icon'>" . $icon . "</div>";
- $display .= "<div class='owner_block_contents clearfloat'>" . $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 = "<div class=\"owner_block_icon\">$icon</div>";
+ $display .= '<div class="owner_block_contents clearfloat">';
+ $display .= "<h3><a href=\"$owner_url\">{$owner->name}</a></h3>";
if ($owner->briefdescription) {
- $desc = $owner->briefdescription;
- $display .= "<p class='profile_info briefdescription'>" . $desc . "</p>";
+ $display .= "<p class=\"profile_info briefdescription\">{$owner->briefdescription}</p>";
}
- $display .= "<p class='profile_info location'>{$location}</p>";
- $display .= "</div>"; // close owner_block_contents
+
+ $location = elgg_view('output/tags', array('value' => $owner->location));
+ $display .= "<p class=\"profile_info location\">$location</p>";
+
+ $display .= elgg_view('owner_block/profile_extend');
+
+ // close owner_block_content
+ $display .= '</div>';
- $contents .= "<div id='owner_block' class='radius8'>".$display."</div>";
+ $contents .= "<div id=\"owner_block\" class=\"radius8\">$display</div>";
}
}