aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/elements/owner_block.php
blob: 11b942dcc7d0f2fe1e01707ba7fb1c8ec22e3100 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
 * Elgg owner block
 * Displays page ownership information
 *
 * @package Elgg
 * @subpackage Core
 *
 */

elgg_push_context('owner_block');

// groups and other users get owner block
$owner = elgg_get_page_owner_entity();
if ($owner instanceof ElggGroup ||
	($owner instanceof ElggUser && $owner->getGUID() != elgg_get_logged_in_user_guid())) {

	$header = elgg_view_entity($owner, false);

	$body = elgg_view_menu('owner_block', array(
		'entity' => $owner,
		'class' => 'elgg-menu-owner-block',
	));

	$body .= elgg_view('page/elements/owner_block/extend', $vars);

	//@todo elgg-module-owner-block?
	echo elgg_view('page/components/module', array(
		'header' => $header,
		'body' => $body,
		'class' => 'elgg-owner-block',
	));
}

elgg_pop_context();