Skip to:
Content

BuddyPress.org

Changeset 11825


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.

Location:
trunk/src/bp-templates/bp-nouveau/buddypress
Files:
3 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; ?>
  • trunk/src/bp-templates/bp-nouveau/buddypress/activity/index.php

    r11686 r11825  
    2929        <?php bp_nouveau_activity_hook( 'before_directory', 'list' ); ?>
    3030
    31         <div class="activity">
     31        <div id="activity-stream" class="activity" data-bp-list="activity">
    3232
    33             <ul id="activity-stream" class="activity-list item-list bp-list" data-bp-list="activity">
    34 
    35                 <li id="bp-ajax-loader"><?php bp_nouveau_user_feedback( 'directory-activity-loading' ); ?></li>
    36 
    37             </ul>
     33                <div id="bp-ajax-loader"><?php bp_nouveau_user_feedback( 'directory-activity-loading' ); ?></div>
    3834
    3935        </div><!-- .activity -->
    4036
    4137        <?php bp_nouveau_after_activity_directory_content(); ?>
     38
    4239    </div><!-- // .screen-content -->
    4340
  • 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.