aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile/views/default')
-rw-r--r--mod/profile/views/default/profile/profile_contents/groups.php11
-rwxr-xr-xmod/profile/views/default/profile/profile_navigation.php5
2 files changed, 15 insertions, 1 deletions
diff --git a/mod/profile/views/default/profile/profile_contents/groups.php b/mod/profile/views/default/profile/profile_contents/groups.php
new file mode 100644
index 000000000..323bb61f1
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_contents/groups.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Profile groups
+ **/
+$groups = list_entities_from_relationship('member',$vars['entity']->getGUID(),false,'group','',0, $limit,false, false);
+
+if(!$groups) {
+ $groups = '<p>' . elgg_echo('profile:no_groups') . '</p>';
+}
+
+echo $groups; \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_navigation.php b/mod/profile/views/default/profile/profile_navigation.php
index bf7ece422..5a7283a9c 100755
--- a/mod/profile/views/default/profile/profile_navigation.php
+++ b/mod/profile/views/default/profile/profile_navigation.php
@@ -22,7 +22,9 @@ switch($section){
case 'details':
$details = 'class="selected"';
break;
-
+ case 'groups':
+ $groups = 'class="selected"';
+ break;
case 'twitter':
$twitter = 'class="selected"';
break;
@@ -42,6 +44,7 @@ switch($section){
<li <?php echo $activity; ?>><a href="<?php echo $url; ?>"><?php echo elgg_echo('activity'); ?></a></li>
<li <?php echo $details; ?>><a href="<?php echo $url . 'details'; ?>"><?php echo elgg_echo('Details'); ?></a></li>
<li <?php echo $friends; ?>><a href="<?php echo $url . 'friends'; ?>"><?php echo elgg_echo('friends'); ?></a></li>
+ <li <?php echo $groups; ?>><a href="<?php echo $url . 'groups'; ?>"><?php echo elgg_echo('groups'); ?></a></li>
<li <?php echo $commentwall; ?>><a href="<?php echo $url . 'commentwall'; ?>"><?php echo elgg_echo('profile:commentwall'); ?></a></li>
<?php
//check to see if the twitter username is set