Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/23/2021 08:07:07 PM (4 years ago)
Author:
imath
Message:

BP Messages: introduce a functionality to exit a messages thread

Exiting a messages thread is removing the user from the list of the recipients of the thread. The thread can carry on between the other recipients.

Props Oelita, vapvarun

Fixes #7540

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/index.php

    r13151 r13196  
    189189                        <span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span>
    190190                    </button>
     191
     192                    <# if ( undefined !== data.recipients && data.recipients.length > 2 ) { #>
     193                        <button type="button" class="message-action-exit bp-tooltip bp-icons" data-bp-action="exit" data-bp-tooltip="<?php esc_attr_e( 'Exit conversation.', 'buddypress' ); ?>">
     194                            <span class="bp-screen-reader-text"><?php esc_html_e( 'Exit conversation.', 'buddypress' ); ?></span>
     195                        </button>
     196                    <# } #>
    191197
    192198                    <# if ( undefined !== data.star_link ) { #>
     
    251257                <span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span>
    252258            </button>
     259
     260            <# if ( undefined !== data.recipients && data.recipients.length > 2 ) { #>
     261                <button type="button" class="message-action-exit bp-tooltip bp-icons" data-bp-action="exit" data-bp-tooltip="<?php esc_attr_e( 'Exit conversation.', 'buddypress' ); ?>">
     262                    <span class="bp-screen-reader-text"><?php esc_html_e( 'Exit conversation.', 'buddypress' ); ?></span>
     263                </button>
     264            <# } #>
    253265        </div>
    254266    </header>
Note: See TracChangeset for help on using the changeset viewer.