aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/sharing/invite.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-04 16:53:04 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-04 16:53:04 +0000
commit83aa919f302dfd00295defd03a089e0619bf9406 (patch)
tree3efdb4825161489107a47df516cac2b92756c08e /mod/groups/views/default/sharing/invite.php
parentef62cf3614a62d61bd53061a0e2d4f81badfe175 (diff)
downloadelgg-83aa919f302dfd00295defd03a089e0619bf9406.tar.gz
elgg-83aa919f302dfd00295defd03a089e0619bf9406.tar.bz2
Refs #109: Invite support added
git-svn-id: https://code.elgg.org/elgg/trunk@1298 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/sharing/invite.php')
-rw-r--r--mod/groups/views/default/sharing/invite.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/mod/groups/views/default/sharing/invite.php b/mod/groups/views/default/sharing/invite.php
new file mode 100644
index 000000000..2194c80bc
--- /dev/null
+++ b/mod/groups/views/default/sharing/invite.php
@@ -0,0 +1,41 @@
+<?php
+ /**
+ * Elgg groups plugin
+ *
+ * @package ElggGroups
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+ $owner = $vars['owner'];
+ $group = $vars['group'];
+
+ if ($friends = get_entities_from_relationship('friend',$owner->getGUID(),false,'user','')) {
+
+ foreach($friends as $friend) {
+
+ if (!$group->isMember($friend))
+ {
+ $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny'));
+ $label .= "{$friend->name}";
+ $options[$label] = $friend->getGUID();
+ }
+ }
+
+ if ($options)
+ {
+ echo elgg_view('input/checkboxes',array(
+
+ 'internalname' => 'user_guid',
+ 'options' => $options,
+
+ ));
+ }
+ else
+ {
+ echo elgg_echo('groups:nofriends');
+ }
+ }
+?> \ No newline at end of file