aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/languages/en.php3
-rw-r--r--mod/groups/start.php12
2 files changed, 13 insertions, 2 deletions
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 0d57f1680..a9743f9d4 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -21,6 +21,7 @@ $english = array(
'groups:delete' => 'Delete group',
'groups:membershiprequests' => 'Manage join requests',
'groups:invitations' => 'Group invitations',
+ 'groups:invitations:pending' => 'Group invitations (%s)',
'groups:icon' => 'Group icon (leave blank to leave unchanged)',
'groups:name' => 'Group name',
@@ -211,7 +212,7 @@ View and reply to the discussion:
'groups:updated' => "Last reply by %s %s",
'groups:started' => "Started by %s",
'groups:joinrequest:remove:check' => 'Are you sure you want to remove this join request?',
- 'groups:invite:remove:check' => 'Are you sure you want to remove this invite?',
+ 'groups:invite:remove:check' => 'Are you sure you want to remove this invitation?',
'groups:invite:body' => "Hi %s,
%s invited you to join the '%s' group. Click below to view your invitations:
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);
}
}