aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups')
-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);