diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-06-04 15:41:31 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-06-04 15:41:31 +0000 |
commit | c33a7b4847a5d1537dcc7272dc056bc64f3f1cb3 (patch) | |
tree | 40266cd4f82dc558d167fe9dc7bf7da7ab885f80 /mod | |
parent | f4b1ebbe468e295d59bf7285b335aa51bcf132bb (diff) | |
download | elgg-c33a7b4847a5d1537dcc7272dc056bc64f3f1cb3.tar.gz elgg-c33a7b4847a5d1537dcc7272dc056bc64f3f1cb3.tar.bz2 |
Merged r6349:6351 from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@6357 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r-- | mod/groups/views/default/widgets/a_users_groups/view.php | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/mod/groups/views/default/widgets/a_users_groups/view.php b/mod/groups/views/default/widgets/a_users_groups/view.php index f020e07c4..687ba7251 100644 --- a/mod/groups/views/default/widgets/a_users_groups/view.php +++ b/mod/groups/views/default/widgets/a_users_groups/view.php @@ -1,50 +1,51 @@ <?php - /** - * Group profile widget - this displays a users groups on their profile - **/ +/** + * Group profile widget - this displays a users groups on their profile + **/ - //the number of groups to display - $number = (int) $vars['entity']->num_display; - if (!$number) - $number = 4; +//the number of groups to display +$number = (int) $vars['entity']->num_display; +if (!$number) { + $number = 4; +} - //the page owner - $owner = $vars['entity']->owner_guid; +//the page owner +$owner = $vars['entity']->owner_guid; - //$groups = get_users_membership($owner); - //$groups = list_entities_from_relationship('member',$owner,false,'group','',0,$number,false,false,false); +//$groups = get_users_membership($owner); +//$groups = list_entities_from_relationship('member',$owner,false,'group','',0,$number,false,false,false); +$groups = get_entities_from_relationship('member', $owner, false, "group", "", 0, "", $number, 0, false, 0); - $options = array( - 'relationship' => 'member', - 'relationship_guid' => $owner, - 'type' => 'group', - 'limit' => $number, - ); - $groups = elgg_get_entities_from_relationship($options); +if ($groups) { + echo "<div class=\"groupmembershipwidget\">"; - if($groups){ - - echo "<div class=\"groupmembershipwidget\">"; - - foreach($groups as $group){ - $icon = elgg_view( + foreach ($groups as $group) { + $icon = elgg_view( "groups/icon", array( - 'entity' => $group, - 'size' => 'small', - ) - ); - - echo "<div class=\"contentWrapper\">" . $icon . " <div class='search_listing_info'><p><span>" . $group->name . "</span><br />"; - echo $group->briefdescription . "</p></div><div class=\"clearfloat\"></div></div>"; + 'entity' => $group, + 'size' => 'small', + ) + ); + + $group_link = $group->getURL(); + + echo <<<___END + +<div class="contentWrapper"> + $icon + <div class="search_listing_info"> + <p> + <span><a href="$group_link">$group->name</a></span><br /> + $group->briefdescription + </p> + </div> + <div class="clearfloat"></div> +</div> +___END; - } - echo "</div>"; } - - -// echo $groups; - -?>
\ No newline at end of file + echo "</div>"; +} |