aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/elements/owner_block.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page/elements/owner_block.php')
-rw-r--r--views/default/page/elements/owner_block.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/views/default/page/elements/owner_block.php b/views/default/page/elements/owner_block.php
new file mode 100644
index 000000000..cee13ebff
--- /dev/null
+++ b/views/default/page/elements/owner_block.php
@@ -0,0 +1,30 @@
+<?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) {
+
+ $header = elgg_view_entity_icon($owner, 'large');
+
+ $body = elgg_view_menu('owner_block', array('entity' => $owner, 'sort_by' => 'priority'));
+
+ $body .= elgg_view('page/elements/owner_block/extend', $vars);
+
+ echo elgg_view('page/components/module', array(
+ 'header' => $header,
+ 'body' => $body,
+ 'class' => 'elgg-owner-block',
+ ));
+}
+
+elgg_pop_context(); \ No newline at end of file