[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-nouveau/buddypress/groups/single/admin/ -> manage-members.php (source)

   1  <?php
   2  /**
   3   * BP Nouveau Group's manage members template.
   4   *
   5   * @since 3.0.0
   6   * @version 5.0.0
   7   */
   8  ?>
   9  
  10  <h2 class="bp-screen-title <?php if ( bp_is_group_create() ) { echo esc_attr( 'creation-step-name' ); } ?>">
  11      <?php esc_html_e( 'Manage Group Members', 'buddypress' ); ?>
  12  </h2>
  13  
  14  <p class="bp-help-text"><?php esc_html_e( 'Manage your group members; promote to moderators, admins or demote or ban.', 'buddypress' ); ?></p>
  15  
  16  <?php if ( bp_rest_api_is_available() ) :
  17      /**
  18       * Get the templates to manage Group Members using the BP REST API.
  19       *
  20       * @since 5.0.0
  21       */
  22      bp_get_template_part( 'common/js-templates/group-members/index' );
  23  
  24  else : ?>
  25  
  26      <dl class="groups-manage-members-list">
  27  
  28      <dt class="admin-section section-title"><?php esc_html_e( 'Administrators', 'buddypress' ); ?></dt>
  29  
  30      <?php if ( bp_has_members( '&include=' . bp_group_admin_ids() ) ) : ?>
  31          <dd class="admin-listing">
  32              <ul id="admins-list" class="item-list single-line">
  33  
  34                  <?php while ( bp_members() ) : bp_the_member(); ?>
  35                  <li class="member-entry clearfix">
  36  
  37                      <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => '' ) ); ?>
  38                      <p class="list-title member-name">
  39                          <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
  40                      </p>
  41  
  42                      <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
  43  
  44                          <p class="action text-links-list">
  45                              <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php esc_html_e( 'Demote to Member', 'buddypress' ); ?></a>
  46                          </p>
  47  
  48                      <?php endif; ?>
  49  
  50                  </li>
  51                  <?php endwhile; ?>
  52  
  53              </ul>
  54          </dd>
  55      <?php endif; ?>
  56  
  57      <?php if ( bp_group_has_moderators() ) : ?>
  58  
  59          <dt class="moderator-section section-title"><?php esc_html_e( 'Moderators', 'buddypress' ); ?></dt>
  60  
  61          <dd class="moderator-listing">
  62          <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
  63              <ul id="mods-list" class="item-list single-line">
  64  
  65                  <?php while ( bp_members() ) : bp_the_member(); ?>
  66                  <li class="members-entry clearfix">
  67  
  68                      <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => '' ) ); ?>
  69                      <p class="list-title member-name">
  70                          <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
  71                      </p>
  72  
  73                      <div class="members-manage-buttons action text-links-list">
  74                          <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin"><?php esc_html_e( 'Promote to Admin', 'buddypress' ); ?></a>
  75                          <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php esc_html_e( 'Demote to Member', 'buddypress' ); ?></a>
  76                      </div>
  77  
  78                  </li>
  79  
  80                  <?php endwhile; ?>
  81  
  82              </ul>
  83  
  84          <?php endif; ?>
  85      </dd>
  86      <?php endif ?>
  87  
  88  
  89      <dt class="gen-members-section section-title"><?php esc_html_e( 'Members', 'buddypress' ); ?></dt>
  90  
  91      <dd class="general-members-listing">
  92          <?php if ( bp_group_has_members( 'per_page=15&exclude_banned=0' ) ) : ?>
  93  
  94              <?php if ( bp_group_member_needs_pagination() ) : ?>
  95  
  96                  <?php bp_nouveau_pagination( 'top' ) ; ?>
  97  
  98              <?php endif; ?>
  99  
 100              <ul id="members-list" class="item-list single-line">
 101                  <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
 102  
 103                      <li class="<?php bp_group_member_css_class(); ?> members-entry clearfix">
 104                          <?php bp_group_member_avatar_mini(); ?>
 105  
 106                          <p class="list-title member-name">
 107                              <?php bp_group_member_link(); ?>
 108                              <span class="banned warn">
 109                                  <?php if ( bp_get_group_member_is_banned() ) : ?>
 110                                      <?php
 111                                      /* translators: indicates a user is banned from a group, e.g. "Mike (banned)". */
 112                                      esc_html_e( '(banned)', 'buddypress' );
 113                                      ?>
 114                                  <?php endif; ?>
 115                              </span>
 116                          </p>
 117  
 118                          <?php bp_nouveau_groups_manage_members_buttons( array( 'container' => 'div', 'container_classes' => array( 'members-manage-buttons', 'text-links-list' ), 'parent_element' => '  ' ) ) ; ?>
 119  
 120                      </li>
 121  
 122                  <?php endwhile; ?>
 123              </ul>
 124      </dd>
 125  
 126  </dl>
 127  
 128      <?php else:
 129  
 130          bp_nouveau_user_feedback( 'group-manage-members-none' );
 131  
 132      endif;
 133  
 134  endif;


Generated: Mon Jul 22 01:01:43 2019 Cross-referenced by PHPXref 0.7.1