Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/07/2013 01:02:33 AM (13 years ago)
Author:
boonebgorges
Message:

Rework "Cancel Friendship Request" button UX in member directories

Member directories have friendship action buttons for each user: notably,
Add Friend for non-friends and Remove Friend for existing friends. When
A has sent a friendship request to B, the button becomes "Cancel Friendship
Request". However, it makes no sense for B to see the same button text for
the pending request, since it's not hers to cancel.

This changeset makes it so that B will see "Friendship Requested", and
the button will lead to B's Friend Requests page, so that she can accept
or reject the request using the latter existing UI.

Fixes #5157

Props terraling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-template.php

    r7228 r7374  
    291291                                break;
    292292
     293                        case 'awaiting_response' :
     294                                $button = array(
     295                                        'id'                => 'awaiting_response',
     296                                        'component'         => 'friends',
     297                                        'must_be_logged_in' => true,
     298                                        'block_self'        => true,
     299                                        'wrapper_class'     => 'friendship-button awaiting_response_friend',
     300                                        'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
     301                                        'link_href'         => bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/',
     302                                        'link_text'         => __( 'Friendship Requested', 'buddypress' ),
     303                                        'link_title'        => __( 'Friendship Requested', 'buddypress' ),
     304                                        'link_id'           => 'friend-' . $potential_friend_id,
     305                                        'link_rel'          => 'remove',
     306                                        'link_class'        => 'friendship-button awaiting_response_friend requested'
     307                                );
     308                                break;
     309
    293310                        case 'is_friend' :
    294311                                $button = array(
Note: See TracChangeset for help on using the changeset viewer.