aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/groups/groupprofile.php9
-rw-r--r--mod/groups/languages/en.php1
-rw-r--r--mod/groups/start.php20
3 files changed, 26 insertions, 4 deletions
diff --git a/mod/groups/groupprofile.php b/mod/groups/groupprofile.php
index 9d354ef0d..2602dac1e 100644
--- a/mod/groups/groupprofile.php
+++ b/mod/groups/groupprofile.php
@@ -10,15 +10,16 @@
*/
$group_guid = get_input('group_guid');
+ set_context('groups');
- $group = get_entity($group_guid);
+ $group = get_entity($group_guid);
- $body = elgg_view('group/group', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true));
+ $body = elgg_view_layout('one_column', elgg_view('group/group', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true)));
- // TODO: Add widgets etc
+ $body .= elgg_view_layout('widgets', "", "", elgg_echo('groups:nowidgets'));
// Finally draw the page
- page_draw($group->name, elgg_view_layout('one_column', $body));
+ page_draw($group->name, $body);
?> \ No newline at end of file
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index f43e89fb5..3f26a6f0e 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -77,6 +77,7 @@ or click below to confirm request:
%s",
'groups:river:member' => 'is now a member of',
+ 'groups:nowidgets' => 'No widgets defined!',
);
diff --git a/mod/groups/start.php b/mod/groups/start.php
index f577b096c..ca402df15 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -53,6 +53,9 @@
// Use group widgets
use_widgets('groups');
+ // Add a page owner
+ add_page_owner_handler('groups_page_owner_handler');
+
// For now, we'll hard code the groups profile items as follows:
// TODO make this user configurable
@@ -74,6 +77,23 @@
}
/**
+ * Set a page owner handler.
+ *
+ */
+ function groups_page_owner_handler()
+ {
+ $group_guid = get_input('group_guid');
+ if ($group_guid)
+ {
+ $group = get_entity($group_guid);
+ if ($group instanceof ElggGroup)
+ return $group->owner_guid;
+ }
+
+ return false;
+ }
+
+ /**
* Group page handler
*
* @param array $page Array of page elements, forwarded by the page handling mechanism