aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-13 16:58:12 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-13 16:58:12 +0000
commit19286968e6c08321e037e2271047ca74aeef1a49 (patch)
treee9ccbb69361670cc778c1688ac37470215a0a8ee /mod
parent6c735edbaefb6b38545c0f730bc6e109fb14f561 (diff)
downloadelgg-19286968e6c08321e037e2271047ca74aeef1a49.tar.gz
elgg-19286968e6c08321e037e2271047ca74aeef1a49.tar.bz2
Fixes #3072 using elgg_list_entities*() in group members sidebar view
git-svn-id: http://code.elgg.org/elgg/trunk@8684 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/views/default/groups/sidebar/members.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/mod/groups/views/default/groups/sidebar/members.php b/mod/groups/views/default/groups/sidebar/members.php
index c18366c1b..28111554f 100644
--- a/mod/groups/views/default/groups/sidebar/members.php
+++ b/mod/groups/views/default/groups/sidebar/members.php
@@ -2,22 +2,28 @@
/**
* Group members sidebar
*
- * @todo clean up html
- *
* @package ElggGroups
+ *
+ * @uses $vars['entity'] Group entity
+ * @uses $vars['limit'] The number of members to display
*/
+$limit = elgg_extract('limit', $vars, 10);
+
$all_link = elgg_view('output/url', array(
'href' => 'groups/members/' . $vars['entity']->guid,
'text' => elgg_echo('groups:members:more'),
));
-$body = '<ul class="elgg-menu-hz">';
-$members = $vars['entity']->getMembers(10);
-foreach ($members as $mem) {
- $body .= '<li class="pas">' . elgg_view_entity_icon($mem, 'tiny', array('override' => true)) . '</li>';
-}
-$body .= '</ul>';
+$body = elgg_list_entities_from_relationship(array(
+ 'relationship' => 'member',
+ 'relationship_guid' => $vars['entity']->guid,
+ 'inverse_relationship' => true,
+ 'types' => 'user',
+ 'limit' => $limit,
+ 'gallery' => true,
+));
+
$body .= "<div class='center mts'>$all_link</div>";
echo elgg_view_module('aside', elgg_echo('groups:members'), $body);