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/activity/activity-loop.php

    r11686 r11825  
    77
    88<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
     9
     10    <ul class="activity-list item-list bp-list" >
    911
    1012    <?php while ( bp_activities() ) : bp_the_activity(); ?>
     
    2224    <?php endif; ?>
    2325
     26    </ul>
     27
    2428<?php else : ?>
    2529
    26     <li id="activity-stream-message" class="bp-messages info">
    2730        <?php bp_nouveau_user_feedback( 'activity-loop-none' ); ?>
    28     </li>
    2931
    3032<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.