<div class="main-column"> <div id="message" class="info"> <p><?php _e('Select people to invite from your friends list.', 'vibe'); ?> </p> </div> <?php /* The ID 'friend-list' is important for AJAX support. */ ?> <ul id="friend-list" class="item-list" role="main"> <?php if (bp_group_has_invites()) { ?> <?php while (bp_group_invites()) { bp_group_the_invite(); ?> <li id="<?php bp_group_invite_item_id(); ?> "> <?php bp_group_invite_user_avatar(); ?>
</div><!-- .left-menu --> <div class="main-column"> <?php /** * Fires before the display of the group send invites list. * * @since BuddyPress (1.1.0) */ do_action('bp_before_group_send_invites_list'); ?> <?php if (bp_group_has_invites(bp_ajax_querystring('invite') . '&per_page=10')) { ?> <div id="pag-top" class="pagination"> <div class="pag-count" id="group-invite-count-top"> <?php bp_group_invite_pagination_count(); ?> </div> <div class="pagination-links" id="group-invite-pag-top"> <?php
function create_screen_save($group_id = null) { global $bp; /* Always check the referer */ check_admin_referer('groups_create_save_' . $this->slug); /* Set method and save */ if (bp_group_has_invites()) { $this->has_invites = true; } $this->method = 'create'; $this->save(); }
/** * @group bp_group_has_invites * @group BP_Groups_Invite_Template */ public function test_bp_group_has_invites_pagination() { $u1 = $this->factory->user->create(array('last_activity' => gmdate('Y-m-d H:i:s', time() - 60))); $g = $this->factory->group->create(array('creator_id' => $u1)); $users = array(); $now = time(); for ($i = 1; $i < 6; $i++) { $users[$i] = $this->factory->user->create(array('last_activity' => gmdate('Y-m-d H:i:s', $now - $i))); $this->add_user_to_group($users[$i], $g, array('date_modified' => gmdate('Y-m-d H:i:s', $now - $i), 'is_confirmed' => 0, 'inviter_id' => $u1, 'invite_sent' => true)); } // Populate the global bp_group_has_invites(array('group_id' => $g, 'user_id' => $u1, 'page' => 2, 'per_page' => 2)); global $invites_template; $this->assertEquals(array($users[3], $users[2]), $invites_template->invites); }