aboutsummaryrefslogtreecommitdiff
path: root/mod/profile
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-19 13:57:08 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-19 13:57:08 +0000
commit36a22860892d74cbbb5885f3192178316bff0945 (patch)
tree84a06bf1ed56d5437382e37e1cc028c454c607ca /mod/profile
parented03a3305603e6928ea409adc7e7402c057a1e70 (diff)
downloadelgg-36a22860892d74cbbb5885f3192178316bff0945.tar.gz
elgg-36a22860892d74cbbb5885f3192178316bff0945.tar.bz2
groups tab added to profile
git-svn-id: http://code.elgg.org/elgg/trunk@6738 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile')
-rw-r--r--mod/profile/index.php3
-rw-r--r--mod/profile/views/default/profile/profile_contents/groups.php11
-rwxr-xr-xmod/profile/views/default/profile/profile_navigation.php5
3 files changed, 18 insertions, 1 deletions
diff --git a/mod/profile/index.php b/mod/profile/index.php
index 41552602d..3b3a882e6 100644
--- a/mod/profile/index.php
+++ b/mod/profile/index.php
@@ -29,6 +29,9 @@ if ($user = get_user_by_username($username)) {
case 'friends':
$body .= elgg_view('profile/profile_contents/friends', array("entity" => $user));
break;
+ case 'groups':
+ $body .= elgg_view('profile/profile_contents/groups', array("entity" => $user));
+ break;
case 'extend':
$body .= elgg_view('profile/profile_contents/extend', array("entity" => $user));
break;
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