Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/24/2011 02:45:58 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Normalize single topic and topic/post edit templates, and clean up associated CSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/groups/single/home.php

    r3771 r3912  
    1 <?php get_header() ?>
     1<?php get_header(); ?>
    22
    33    <div id="content">
    44        <div class="padder">
     5
    56            <?php if ( bp_has_groups() ) : while ( bp_groups() ) : bp_the_group(); ?>
    67
     
    89
    910            <div id="item-header" role="complementary">
    10                 <?php locate_template( array( 'groups/single/group-header.php' ), true ) ?>
     11
     12                <?php locate_template( array( 'groups/single/group-header.php' ), true ); ?>
     13
    1114            </div><!-- #item-header -->
    1215
     
    1417                <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
    1518                    <ul>
    16                         <?php bp_get_options_nav() ?>
    1719
    18                         <?php do_action( 'bp_group_options_nav' ) ?>
     20                        <?php bp_get_options_nav(); ?>
     21
     22                        <?php do_action( 'bp_group_options_nav' ); ?>
     23
    1924                    </ul>
    2025                </div>
     
    2227
    2328            <div id="item-body">
    24                 <?php do_action( 'bp_before_group_body' ) ?>
    2529
    26                 <?php if ( bp_is_group_admin_page() && bp_group_is_visible() ) : ?>
    27                     <?php locate_template( array( 'groups/single/admin.php' ), true ) ?>
     30                <?php do_action( 'bp_before_group_body' );
    2831
    29                 <?php elseif ( bp_is_group_members() && bp_group_is_visible() ) : ?>
    30                     <?php locate_template( array( 'groups/single/members.php' ), true ) ?>
     32                if ( bp_is_group_admin_page() && bp_group_is_visible() ) :
     33                    locate_template( array( 'groups/single/admin.php' ), true );
    3134
    32                 <?php elseif ( bp_is_group_invites() && bp_group_is_visible() ) : ?>
    33                     <?php locate_template( array( 'groups/single/send-invites.php' ), true ) ?>
     35                elseif ( bp_is_group_members() && bp_group_is_visible() ) :
     36                    locate_template( array( 'groups/single/members.php' ), true );
    3437
    35                 <?php elseif ( bp_is_group_forum() && bp_group_is_visible() ) : ?>
    36                     <?php locate_template( array( 'groups/single/forum.php' ), true ) ?>
     38                elseif ( bp_is_group_invites() && bp_group_is_visible() ) :
     39                    locate_template( array( 'groups/single/send-invites.php' ), true );
    3740
    38                 <?php elseif ( bp_is_group_membership_request() ) : ?>
    39                     <?php locate_template( array( 'groups/single/request-membership.php' ), true ) ?>
     41                elseif ( bp_is_group_forum() && bp_group_is_visible() ) :
     42                    locate_template( array( 'groups/single/forum.php' ), true );
    4043
    41                 <?php elseif ( bp_group_is_visible() && bp_is_active( 'activity' ) ) : ?>
    42                     <?php locate_template( array( 'groups/single/activity.php' ), true ) ?>
     44                elseif ( bp_is_group_membership_request() ) :
     45                    locate_template( array( 'groups/single/request-membership.php' ), true );
    4346
    44                 <?php elseif ( !bp_group_is_visible() ) : ?>
    45                     <?php /* The group is not visible, show the status message */ ?>
     47                elseif ( bp_group_is_visible() && bp_is_active( 'activity' ) ) :
     48                    locate_template( array( 'groups/single/activity.php' ), true );
    4649
    47                     <?php do_action( 'bp_before_group_status_message' ) ?>
     50                elseif ( !bp_group_is_visible() ) :
     51                    // The group is not visible, show the status message
     52
     53                    do_action( 'bp_before_group_status_message' ); ?>
    4854
    4955                    <div id="message" class="info">
    50                         <p><?php bp_group_status_message() ?></p>
     56                        <p><?php bp_group_status_message(); ?></p>
    5157                    </div>
    5258
    53                     <?php do_action( 'bp_after_group_status_message' ) ?>
     59                    <?php do_action( 'bp_after_group_status_message' );
    5460
    55                 <?php else : ?>
    56                     <?php
    57                         /* If nothing sticks, just load a group front template if one exists. */
    58                         locate_template( array( 'groups/single/front.php' ), true );
    59                     ?>
    60                 <?php endif; ?>
     61                else :
     62                    // If nothing sticks, just load a group front template if one exists.
     63                    locate_template( array( 'groups/single/front.php' ), true );
    6164
    62                 <?php do_action( 'bp_after_group_body' ) ?>
     65                endif;
     66
     67                do_action( 'bp_after_group_body' ); ?>
     68
    6369            </div><!-- #item-body -->
    6470
    65             <?php do_action( 'bp_after_group_home_content' ) ?>
     71            <?php do_action( 'bp_after_group_home_content' ); ?>
    6672
    6773            <?php endwhile; endif; ?>
     74
    6875        </div><!-- .padder -->
    6976    </div><!-- #content -->
    7077
    71     <?php get_sidebar() ?>
    72 
    73 <?php get_footer() ?>
     78<?php get_sidebar(); ?>
     79<?php get_footer(); ?>
Note: See TracChangeset for help on using the changeset viewer.