aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups')
-rw-r--r--mod/groups/languages/en.php2
-rw-r--r--mod/groups/membershipreq.php6
-rw-r--r--mod/groups/start.php2
-rw-r--r--mod/groups/views/default/groups/members.php2
-rw-r--r--mod/groups/views/default/groups/membershiprequests.php30
5 files changed, 36 insertions, 6 deletions
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 27334fe82..3f3505b02 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -57,6 +57,8 @@
'groups:notfound' => "Group not found",
'groups:notfound:details' => "The requested group either does not exist or you do not have access to it",
+ 'groups:requests:none' => 'There are no outstanding membership requests at this time.',
+
'item:object:groupforumtopic' => "Discussion topics",
'groupforumtopic:new' => "New discussion post",
diff --git a/mod/groups/membershipreq.php b/mod/groups/membershipreq.php
index 48e4a2500..983f8d363 100644
--- a/mod/groups/membershipreq.php
+++ b/mod/groups/membershipreq.php
@@ -23,10 +23,8 @@
if (($group) && ($group->canEdit()))
{
-
-
-
-
+ $requests = get_entities_from_relationship('membership_request',$group_guid,false,'','',0,'',9999);
+ $area2 .= elgg_view('groups/membershiprequests',array('requests' => $requests));
} else {
$area2 .= elgg_echo("groups:noaccess");
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 094deb786..f609ef90d 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -198,7 +198,7 @@
if ($page_owner->canEdit()) {
add_submenu_item(elgg_echo('groups:edit'),$CONFIG->wwwroot . "mod/groups/edit.php?group_guid=" . $page_owner->getGUID(), '1groupsactions');
add_submenu_item(elgg_echo('groups:invite'),$CONFIG->wwwroot . "mod/groups/invite.php?group_guid={$page_owner->getGUID()}", '1groupsactions');
- // add_submenu_item(elgg_echo('groups:membershiprequests'),$CONFIG->wwwroot . "mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}", '1groupsactions');
+ add_submenu_item(elgg_echo('groups:membershiprequests'),$CONFIG->wwwroot . "mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}", '1groupsactions');
}
if ($page_owner->isMember($_SESSION['user'])) {
if ($page_owner->getOwner() != $_SESSION['guid'])
diff --git a/mod/groups/views/default/groups/members.php b/mod/groups/views/default/groups/members.php
index e2673f967..62cb723ef 100644
--- a/mod/groups/views/default/groups/members.php
+++ b/mod/groups/views/default/groups/members.php
@@ -21,7 +21,7 @@
$members = $vars['entity']->getMembers(10);
foreach($members as $mem){
- echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny', 'override' => 'true')) . "</div>";
+ echo "<div class=\"member_icon\"><a href=\"".$mem->getURL()."\">" . elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny', 'override' => 'true')) . "</a></div>";
}
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
new file mode 100644
index 000000000..f442c1a93
--- /dev/null
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -0,0 +1,30 @@
+<?php
+
+ if (!empty($vars['requests']) && is_array($vars['requests'])) {
+
+ foreach($vars['requests'] as $request)
+ if ($request instanceof ElggUser) {
+
+?>
+ <div class="reportedcontent_content active_report">
+ <p class="reportedcontent_detail">
+ <?php
+
+ echo $request->name;
+
+ ?>
+ </p>
+ </div>
+<?php
+
+ }
+
+ } else {
+
+ echo "<div class=\"contentWrapper\">";
+ echo "<p>" . elgg_echo('groups:requests:none') . "</p>";
+ echo "</div>";
+
+ }
+
+?> \ No newline at end of file