Skip to:
Content

BuddyPress.org

Changeset 9357


Ignore:
Timestamp:
01/14/2015 09:51:53 PM (10 years ago)
Author:
r-a-y
Message:

bp-legacy: Enhance usability on a group's "Send Invites" page.

This commit adds better feedback messages depending on if a user has
friends to invite to a group.

See #5509.

Location:
trunk/src/bp-templates/bp-legacy/buddypress/groups/single
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/single/invites-loop.php

    r8958 r9357  
     1
    12<div class="left-menu">
    23
     
    7677
    7778    <?php else : ?>
     79
    7880        <div id="message" class="info">
    79             <p><?php _e( 'Select people to invite from your friends list.', 'buddypress' ); ?></p>
     81            <p><?php _e( 'Select friends to invite.', 'buddypress' ); ?></p>
    8082        </div>
     83
    8184    <?php endif; ?>
    8285
     
    8588</div><!-- .main-column -->
    8689
    87 <div class="clear"></div>
    88 
    8990<div class="submit">
    9091    <input type="submit" name="submit" id="submit" value="<?php esc_attr_e( 'Send Invites', 'buddypress' ); ?>" />
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/single/send-invites.php

    r8063 r9357  
    11<?php do_action( 'bp_before_group_send_invites_content' ); ?>
    22
    3 <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
     3<?php
     4/* Does the user have friends that could be invited to the group? */
     5if ( bp_get_new_group_invite_friend_list() ) : ?>
    46
    57    <?php /* 'send-invite-form' is important for AJAX support */ ?>
     
    79
    810        <div class="invite">
    9 
    1011            <?php bp_get_template_part( 'groups/single/invites-loop' ); ?>
    11 
    1212        </div>
    1313
     
    1717    </form><!-- #send-invite-form -->
    1818
     19<?php
     20/* No eligible friends? Maybe the user doesn't have any friends yet. */
     21elseif ( 0 == bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
     22
     23    <div id="message" class="info">
     24        <p class="notice"><?php _e( 'Group invitations can only be extended to friends.', 'buddypress' ); ?></p>
     25        <p class="message-body"><?php _e( "Once you've made some friendships, you'll be able to invite those members to this group.", 'buddypress' ); ?></p>
     26    </div>
     27
     28<?php
     29/* The user does have friends, but none are eligible to be invited to this group. */
     30else : ?>
     31
     32    <div id="message" class="info">
     33        <p class="notice"><?php _e( 'All of your friends already belong to this group.', 'buddypress' ); ?></p>
     34    </div>
     35
    1936<?php endif; ?>
    2037
Note: See TracChangeset for help on using the changeset viewer.