aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-05 22:04:54 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-05 22:04:54 +0000
commit89cb69c643fc244bad8836a044cf47a719afb6e9 (patch)
tree68c07f95f94f53a45a2413bfd8b548e03a34b8e3 /mod
parent59b6d85ff21c181718a367e40bdfd1c56c2be3a2 (diff)
downloadelgg-89cb69c643fc244bad8836a044cf47a719afb6e9.tar.gz
elgg-89cb69c643fc244bad8836a044cf47a719afb6e9.tar.bz2
cleaned up the group invitations and membership request pages
git-svn-id: http://code.elgg.org/elgg/trunk@8593 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/views/default/groups/invitationrequests.php19
-rw-r--r--mod/groups/views/default/groups/membershiprequests.php74
2 files changed, 55 insertions, 38 deletions
diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php
index 11cac52de..788788324 100644
--- a/mod/groups/views/default/groups/invitationrequests.php
+++ b/mod/groups/views/default/groups/invitationrequests.php
@@ -2,11 +2,12 @@
/**
* A user's group invitations
*
- * @uses $vars['invitations']
+ * @uses $vars['invitations'] Array of ElggGroups
*/
if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
$user = elgg_get_logged_in_user_entity();
+ echo '<ul class="elgg-list">';
foreach ($vars['invitations'] as $group) {
if ($group instanceof ElggGroup) {
$icon = elgg_view_entity_icon($group, 'tiny', array('override' => 'true'));
@@ -28,17 +29,21 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
'href' => $url,
'confirm' => elgg_echo('groups:invite:remove:check'),
'text' => elgg_echo('delete'),
- 'class' => 'elgg-button elgg-button-action elgg-state-disabled',
+ 'class' => 'elgg-button elgg-button-delete mlm',
));
$body = <<<HTML
-<p class="entity-title">$group_title</p>
-<p class="entity-subtext">$group->briefdescription</p>
-$accept_button $delete_button
+<h4>$group_title</h4>
+<p class="elgg-subtext">$group->briefdescription</p>
HTML;
- echo elgg_view_image_block($icon, $body);
+ $alt = $accept_button . $delete_button;
+
+ echo '<li class="pvs">';
+ echo elgg_view_image_block($icon, $body, array('image_alt' => $alt));
+ echo '</li>';
}
}
+ echo '</ul>';
} else {
- echo "<p class='default_string mtm'>" . elgg_echo('groups:invitations:none') . "</p>";
+ echo '<p class="mtm">' . elgg_echo('groups:invitations:none') . "</p>";
}
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
index 303b9aad1..4d1c78c8c 100644
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -1,36 +1,48 @@
<?php
+/**
+ * A group's member requests
+ *
+ * @uses $vars['entity'] ElggGroup
+ * @uses $vars['requests'] Array of ElggUsers
+ */
- if (!empty($vars['requests']) && is_array($vars['requests'])) {
+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('override' => 'true'));
- foreach($vars['requests'] as $request)
- if ($request instanceof ElggUser) {
-
- ?>
- <div class="elgg-image-block group_invitations clearfix">
- <?php
- echo "<div class='elgg-image'>";
- echo elgg_view_entity_icon($request, 'small', array('override' => 'true'));
- echo "</div>";
-
- $url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/groups/addtogroup?user_guid={$request->guid}&group_guid={$vars['entity']->guid}");
- ?>
- <div class="elgg-body">
- <a href="<?php echo $url; ?>" class="elgg-button elgg-button-submit"><?php echo elgg_echo('accept'); ?></a>
- <?php
- echo str_replace('<a', '<a class="elgg-button elgg-button-cancel elgg-state-disabled" ', elgg_view('output/confirmlink',array(
- 'href' => 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid,
- 'confirm' => elgg_echo('groups:joinrequest:remove:check'),
- 'text' => elgg_echo('delete'),
- )));
- echo "<p class='entity-title'><a href=\"" . $request->getUrl() . "\">" . $request->name . "</a></p>";
- echo "<p class='entity-subtext'>" . $request->briefdescription . "</p>";
- ?>
- </div>
- </div>
- <?php
+ $user_title = elgg_view('output/url', array(
+ 'href' => $user->getURL(),
+ 'text' => $user->name,
+ ));
+
+ $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',
+ ));
+
+ $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;
+
+ echo '<li class="pvs">';
+ echo elgg_view_image_block($icon, $body, array('image_alt' => $alt));
+ echo '</li>';
}
- } else {
- echo "<p>" . elgg_echo('groups:requests:none') . "</p>";
}
-
-?> \ No newline at end of file
+ echo '</ul>';
+} else {
+ echo '<p class="mtm">' . elgg_echo('groups:requests:none') . "</p>";
+}