aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-10-27 17:51:26 -0400
committercash <cash.costello@gmail.com>2011-10-27 17:51:26 -0400
commit2f59afd29170066cb0d8ae19aa76ef2b7cb0b7db (patch)
tree2c7ad1eadffc42bbd2b1297710c97cc60478554c /mod
parent3696b578127dca0947871ca85f2a16ff2043aa11 (diff)
downloadelgg-2f59afd29170066cb0d8ae19aa76ef2b7cb0b7db.tar.gz
elgg-2f59afd29170066cb0d8ae19aa76ef2b7cb0b7db.tar.bz2
Refs #3296 displaying all group membership requests on one page
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/lib/groups.php2
-rw-r--r--mod/groups/views/default/groups/membershiprequests.php54
2 files changed, 28 insertions, 28 deletions
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php
index 4e2b045a6..44143d440 100644
--- a/mod/groups/lib/groups.php
+++ b/mod/groups/lib/groups.php
@@ -388,9 +388,11 @@ function groups_handle_requests_page($guid) {
elgg_push_breadcrumb($title);
$requests = elgg_get_entities_from_relationship(array(
+ 'type' => 'user',
'relationship' => 'membership_request',
'relationship_guid' => $guid,
'inverse_relationship' => true,
+ 'limit' => 0,
));
$content = elgg_view('groups/membershiprequests', array(
'requests' => $requests,
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
index 489d6f5e3..bc6d9af5a 100644
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -10,39 +10,37 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) {
$user = elgg_get_logged_in_user_entity();
echo '<ul class="elgg-list">';
foreach ($vars['requests'] as $user) {
- if ($user instanceof ElggUser) {
- $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => 'true'));
+ $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => 'true'));
- $user_title = elgg_view('output/url', array(
- 'href' => $user->getURL(),
- 'text' => $user->name,
- 'is_trusted' => true,
- ));
+ $user_title = elgg_view('output/url', array(
+ 'href' => $user->getURL(),
+ 'text' => $user->name,
+ 'is_trusted' => true,
+ ));
- $url = "action/groups/addtogroup?user_guid={$user->guid}&group_guid={$vars['entity']->guid}";
- $url = elgg_add_action_tokens_to_url($url);
- $accept_button = elgg_view('output/url', array(
- 'href' => $url,
- 'text' => elgg_echo('accept'),
- 'class' => 'elgg-button elgg-button-submit',
- 'is_trusted' => true,
- ));
+ $url = "action/groups/addtogroup?user_guid={$user->guid}&group_guid={$vars['entity']->guid}";
+ $url = elgg_add_action_tokens_to_url($url);
+ $accept_button = elgg_view('output/url', array(
+ 'href' => $url,
+ 'text' => elgg_echo('accept'),
+ 'class' => 'elgg-button elgg-button-submit',
+ 'is_trusted' => true,
+ ));
- $url = 'action/groups/killrequest?user_guid=' . $user->guid . '&group_guid=' . $vars['entity']->guid;
- $delete_button = elgg_view('output/confirmlink', array(
- 'href' => $url,
- 'confirm' => elgg_echo('groups:joinrequest:remove:check'),
- 'text' => elgg_echo('delete'),
- 'class' => 'elgg-button elgg-button-delete mlm',
- ));
+ $url = 'action/groups/killrequest?user_guid=' . $user->guid . '&group_guid=' . $vars['entity']->guid;
+ $delete_button = elgg_view('output/confirmlink', array(
+ 'href' => $url,
+ 'confirm' => elgg_echo('groups:joinrequest:remove:check'),
+ 'text' => elgg_echo('delete'),
+ 'class' => 'elgg-button elgg-button-delete mlm',
+ ));
- $body = "<h4>$user_title</h4>";
- $alt = $accept_button . $delete_button;
+ $body = "<h4>$user_title</h4>";
+ $alt = $accept_button . $delete_button;
- echo '<li class="pvs">';
- echo elgg_view_image_block($icon, $body, array('image_alt' => $alt));
- echo '</li>';
- }
+ echo '<li class="pvs">';
+ echo elgg_view_image_block($icon, $body, array('image_alt' => $alt));
+ echo '</li>';
}
echo '</ul>';
} else {