Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/10/2019 07:57:41 PM (7 years ago)
Author:
boonebgorges
Message:

Nouveau: Fixes for the Friends Request page.

The Friends Request page was introduced in Nouveau with the same dropdown
filter as on other member directories, but the functionality was never
fully implemented. In this changeset, we make the following changes:

  • Ensure that the AJAX request distinguishes between friend request queries and other membership queries, so that the members returned are limited to friend requests.
  • Break the friend request loop logic into its own template, so that the outer template information (title, pagination, etc) doesn't appear twice after an AJAX filter.
  • Modify the logic in the friend-request template so that it uses bp_ajax_querystring(), which lets the filters affect the returned results.

Props imath.
Fixes #8035.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/single/friends/requests-loop.php

    r12321 r12322  
    11<?php
    22/**
    3  * BuddyPress - Members Friends Requests
     3 * BuddyPress - Members Friends Requests Loop
    44 *
    5  * @since 3.0.0
    6  * @version 3.0.0
     5 * @since 5.0.0
     6 * @version 5.0.0
    77 */
    88?>
    99
    10 <h2 class="screen-heading friendship-requests-screen"><?php esc_html_e( 'Friendship Requests', 'buddypress' ); ?></h2>
    11 
    12 <?php bp_nouveau_member_hook( 'before', 'friend_requests_content' ); ?>
    13 
    14 <?php if ( bp_has_members( 'type=alphabetical&include=' . bp_get_friendship_requests() ) ) : ?>
     10<?php if ( bp_has_members( bp_ajax_querystring( 'friendship_requests' ) . '&include=' . bp_get_friendship_requests() ) ) : ?>
    1511
    1612    <?php bp_nouveau_pagination( 'top' ); ?>
    1713
    18     <ul id="friend-list" class="<?php bp_nouveau_loop_classes(); ?>" data-bp-list="friendship_requests">
     14    <ul id="friend-list" class="<?php bp_nouveau_loop_classes(); ?>">
    1915        <?php
    2016        while ( bp_members() ) :
     
    4945
    5046<?php endif; ?>
    51 
    52 <?php
    53 bp_nouveau_member_hook( 'after', 'friend_requests_content' );
Note: See TracChangeset for help on using the changeset viewer.