From a201a5bba863a6d0dfa3b68d73a227cfcc7f66b6 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 25 Dec 2010 22:18:16 +0000 Subject: updated owner blocks for users and groups git-svn-id: http://code.elgg.org/elgg/trunk@7721 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/group/default.php | 60 +++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) (limited to 'mod/groups/views/default/group/default.php') diff --git a/mod/groups/views/default/group/default.php b/mod/groups/views/default/group/default.php index 25e07602b..3ba482d63 100644 --- a/mod/groups/views/default/group/default.php +++ b/mod/groups/views/default/group/default.php @@ -5,9 +5,65 @@ * @package ElggGroups */ +$group = $vars['entity']; + +$icon = elgg_view("groups/icon", array( + 'entity' => $group, + 'size' => 'tiny', +)); + +//get the membership type +$membership = $group->membership; +if ($membership == ACCESS_PUBLIC) { + $mem = elgg_echo("groups:open"); +} else { + $mem = elgg_echo("groups:closed"); +} + +// number of members +$num_members = '17 ' . elgg_echo('groups:member'); + +$metadata = ""; + +if (elgg_in_context('owner_block') || elgg_in_context('widgets')) { + $metadata = ''; +} + + if ($vars['full']) { echo elgg_view("groups/groupprofile",$vars); } else { - echo elgg_view("groups/grouplisting",$vars); + // brief view + + $params = array( + 'entity' => $group, + 'metadata' => $metadata, + 'subtitle' => $group->briefdescription, + ); + $list_body = elgg_view('layout/objects/list/body', $params); + + echo elgg_view_image_block($icon, $list_body); } -?> \ No newline at end of file -- cgit v1.2.3