/bp-themes/bp-default/groups/index.php

  1. <?php 
  2.  
  3. /** 
  4. * BuddyPress - Groups Directory 
  5. * 
  6. * @package BuddyPress 
  7. * @subpackage bp-default 
  8. */ 
  9.  
  10. get_header( 'buddypress' ); ?> 
  11.  
  12. <?php do_action( 'bp_before_directory_groups_page' ); ?> 
  13.  
  14. <div id="content"> 
  15. <div class="padder"> 
  16.  
  17. <?php do_action( 'bp_before_directory_groups' ); ?> 
  18.  
  19. <form action="" method="post" id="groups-directory-form" class="dir-form"> 
  20.  
  21. <h3><?php _e( 'Groups Directory', 'buddypress' ); ?><?php if ( is_user_logged_in() && bp_user_can_create_groups() ) : ?>  <a class="button" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create' ); ?>"><?php _e( 'Create a Group', 'buddypress' ); ?></a><?php endif; ?></h3> 
  22.  
  23. <?php do_action( 'bp_before_directory_groups_content' ); ?> 
  24.  
  25. <div id="group-dir-search" class="dir-search" role="search"> 
  26.  
  27. <?php bp_directory_groups_search_form(); ?> 
  28.  
  29. </div><!-- #group-dir-search --> 
  30.  
  31. <?php do_action( 'template_notices' ); ?> 
  32.  
  33. <div class="item-list-tabs" role="navigation"> 
  34. <ul> 
  35. <li class="selected" id="groups-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ); ?>"><?php printf( __( 'All Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count() ); ?></a></li> 
  36.  
  37. <?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?> 
  38.  
  39. <li id="groups-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() . '/my-groups' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li> 
  40.  
  41. <?php endif; ?> 
  42.  
  43. <?php do_action( 'bp_groups_directory_group_filter' ); ?> 
  44.  
  45. </ul> 
  46. </div><!-- .item-list-tabs --> 
  47.  
  48. <div class="item-list-tabs" id="subnav" role="navigation"> 
  49. <ul> 
  50.  
  51. <?php do_action( 'bp_groups_directory_group_types' ); ?> 
  52.  
  53. <li id="groups-order-select" class="last filter"> 
  54.  
  55. <label for="groups-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label> 
  56. <select id="groups-order-by"> 
  57. <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option> 
  58. <option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option> 
  59. <option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option> 
  60. <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option> 
  61.  
  62. <?php do_action( 'bp_groups_directory_order_options' ); ?> 
  63.  
  64. </select> 
  65. </li> 
  66. </ul> 
  67. </div> 
  68.  
  69. <div id="groups-dir-list" class="groups dir-list"> 
  70.  
  71. <?php locate_template( array( 'groups/groups-loop.php' ), true ); ?> 
  72.  
  73. </div><!-- #groups-dir-list --> 
  74.  
  75. <?php do_action( 'bp_directory_groups_content' ); ?> 
  76.  
  77. <?php wp_nonce_field( 'directory_groups', '_wpnonce-groups-filter' ); ?> 
  78.  
  79. <?php do_action( 'bp_after_directory_groups_content' ); ?> 
  80.  
  81. </form><!-- #groups-directory-form --> 
  82.  
  83. <?php do_action( 'bp_after_directory_groups' ); ?> 
  84.  
  85. </div><!-- .padder --> 
  86. </div><!-- #content --> 
  87.  
  88. <?php do_action( 'bp_after_directory_groups_page' ); ?> 
  89.  
  90. <?php get_sidebar( 'buddypress' ); ?> 
  91. <?php get_footer( 'buddypress' ); ?> 
.