aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/start.php')
-rw-r--r--mod/groups/start.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 9dca7dc16..25ce56350 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -163,11 +163,21 @@ function groups_setup_sidebar_menus() {
$url = "groups/owner/$user->username";
$item = new ElggMenuItem('groups:owned', elgg_echo('groups:owned'), $url);
elgg_register_menu_item('page', $item);
+
$url = "groups/member/$user->username";
$item = new ElggMenuItem('groups:member', elgg_echo('groups:yours'), $url);
elgg_register_menu_item('page', $item);
+
$url = "groups/invitations/$user->username";
- $item = new ElggMenuItem('groups:user:invites', elgg_echo('groups:invitations'), $url);
+ $invitations = groups_get_invited_groups($user->getGUID());
+ if (is_array($invitations) && !empty($invitations)) {
+ $invitation_count = count($invitations);
+ $text = elgg_echo('groups:invitations:pending', array($invitation_count));
+ } else {
+ $text = elgg_echo('groups:invitations');
+ }
+
+ $item = new ElggMenuItem('groups:user:invites', $text, $url);
elgg_register_menu_item('page', $item);
}
}