aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/widgets/a_users_groups/content.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views/default/widgets/a_users_groups/content.php')
-rw-r--r--mod/groups/views/default/widgets/a_users_groups/content.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/mod/groups/views/default/widgets/a_users_groups/content.php b/mod/groups/views/default/widgets/a_users_groups/content.php
new file mode 100644
index 000000000..fe1a46e39
--- /dev/null
+++ b/mod/groups/views/default/widgets/a_users_groups/content.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Elgg file widget view
+ *
+ * @package ElggFile
+ */
+
+
+$num = $vars['entity']->num_display;
+
+$options = array(
+ 'type' => 'group',
+ 'relationship' => 'member',
+ 'relationship_guid' => $vars['entity']->owner_guid,
+ 'limit' => $num,
+ 'full_view' => FALSE,
+ 'pagination' => FALSE,
+);
+$content = elgg_list_entities_from_relationship($options);
+
+echo $content;
+
+if ($content) {
+ $url = "groups/member/" . elgg_get_page_owner_entity()->username;
+ $more_link = elgg_view('output/url', array(
+ 'href' => $url,
+ 'text' => elgg_echo('groups:more'),
+ 'is_trusted' => true,
+ ));
+ echo "<span class=\"elgg-widget-more\">$more_link</span>";
+} else {
+ echo elgg_echo('groups:none');
+}