Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/27/2018 12:21:27 PM (7 years ago)
Author:
hnla
Message:

Nouveau: re-factor activity template loops main dir & members single

The loops JS inject all act content & loop messages into a ul construct regardless of whether there is true list loop content e.g no activity found or loading loop messages, single items are not a list, we should only show a ul if rendering loop content, this also impacts styles where messages look odd in a li element.

Commit moves the JS required hooks & 'data-bp-list="activity"' up a level to the wrapper element, re-factors the 'if bp_has_activities' to wrap only the ul which moves into the activity-loop.php template, moves the message functions out of the loops & removes unnecessary markup for messages.

File:
1 edited

Legend:

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

    r11686 r11825  
    2323<?php bp_nouveau_member_hook( 'before', 'activity_content' ); ?>
    2424
    25 <div class="activity single-user">
     25<div id="activity-stream" class="activity single-user" data-bp-list="activity">
    2626
    27     <ul id="activity-stream" class="<?php bp_nouveau_loop_classes(); ?>" data-bp-list="activity">
     27    <div id="bp-ajax-loader"><?php bp_nouveau_user_feedback( 'member-activity-loading' ); ?></div>
    2828
    29         <li id="bp-ajax-loader"><?php bp_nouveau_user_feedback( 'member-activity-loading' ); ?></li>
     29    <ul  class="<?php bp_nouveau_loop_classes(); ?>" >
    3030
    3131    </ul>
Note: See TracChangeset for help on using the changeset viewer.