Skip to:
Content

BuddyPress.org

Changeset 12059


Ignore:
Timestamp:
05/05/2018 06:32:09 AM (7 years ago)
Author:
imath
Message:

BP Nouveau: avoid empty links in the Group Invites UI

See #7794

Location:
trunk/src/bp-templates/bp-nouveau
Files:
3 edited

Legend:

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

    r12057 r12059  
    8989
    9090<script type="text/html" id="tmpl-bp-invites-selection">
    91     <a href="#" title="{{data.name}}">
    92         <img src="{{data.avatar}}" class="avatar" alt="{{data.name}}" />
     91    <a href="#uninvite-user-{{data.id}}" title="{{data.name}}">
     92        <img src="{{data.avatar}}" class="avatar" title="{{data.name}}"/>
    9393    </a>
    9494</script>
  • trunk/src/bp-templates/bp-nouveau/includes/groups/functions.php

    r12048 r12059  
    113113    // Init the Group invites nav
    114114    $invites_nav = array(
    115         'members' => array( 'id' => 'members', 'caption' => __( 'All Members', 'buddypress' ), 'order' => 5 ),
    116         'invited' => array( 'id' => 'invited', 'caption' => __( 'Pending Invites', 'buddypress' ), 'order' => 90, 'hide' => (int) ! $show_pending ),
    117         'invites' => array( 'id' => 'invites', 'caption' => __( 'Send Invites', 'buddypress' ), 'order' => 100, 'hide' => 1 ),
     115        'members' => array(
     116            'id'      => 'members',
     117            'caption' => __( 'All Members', 'buddypress' ),
     118            'order'   => 5,
     119        ),
     120        'invited' => array(
     121            'id'      => 'invited',
     122            'caption' => __( 'Pending Invites', 'buddypress' ),
     123            'order'   => 90,
     124            'hide'    => (int) ! $show_pending,
     125        ),
     126        'invites' => array(
     127            'id'      => 'invites',
     128            'caption' => __( 'Send Invites', 'buddypress' ),
     129            'order'   => 100,
     130            'hide'    => 1,
     131            'href'    => '#send-invites-editor',
     132        ),
    118133    );
    119134
    120135    if ( bp_is_active( 'friends' ) ) {
    121         $invites_nav['friends'] = array( 'id' => 'friends', 'caption' => __( 'My Friends', 'buddypress' ), 'order' => 0 );
     136        $invites_nav['friends'] = array(
     137            'id'      => 'friends',
     138            'caption' => __( 'My Friends', 'buddypress' ),
     139            'order'   => 0,
     140        );
    122141
    123142        if ( true === bp_nouveau_groups_disallow_all_members_invites() ) {
  • trunk/src/bp-templates/bp-nouveau/js/buddypress-group-invites.js

    r12057 r12059  
    7373                    id     : item.id,
    7474                    name   : item.caption,
    75                     href   : '#',
     75                    href   : item.href || '#members-list',
    7676                    active : activeView,
    7777                    hide   : _.isUndefined( item.hide ) ? 0 : item.hide
     
    807807        initialize: function() {
    808808            this.model.on( 'change:selected', this.removeView, this );
     809            this.el.id = 'uninvite-user-' + this.model.get( 'id' );
    809810        },
    810811
Note: See TracChangeset for help on using the changeset viewer.