[ 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 10.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      bp_groups_manage_group_members_interface();
  19  
  20  else : ?>
  21  
  22      <dl class="groups-manage-members-list">
  23  
  24      <dt class="admin-section section-title"><?php esc_html_e( 'Administrators', 'buddypress' ); ?></dt>
  25  
  26      <?php if ( bp_has_members( '&include=' . bp_group_admin_ids() ) ) : ?>
  27          <dd class="admin-listing">
  28              <ul id="admins-list" class="item-list single-line">
  29  
  30                  <?php while ( bp_members() ) : bp_the_member(); ?>
  31                  <li class="member-entry clearfix">
  32  
  33                      <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => '' ) ); ?>
  34                      <p class="list-title member-name">
  35                          <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
  36                      </p>
  37  
  38                      <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
  39  
  40                          <p class="action text-links-list">
  41                              <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>
  42                          </p>
  43  
  44                      <?php endif; ?>
  45  
  46                  </li>
  47                  <?php endwhile; ?>
  48  
  49              </ul>
  50          </dd>
  51      <?php endif; ?>
  52  
  53      <?php if ( bp_group_has_moderators() ) : ?>
  54  
  55          <dt class="moderator-section section-title"><?php esc_html_e( 'Moderators', 'buddypress' ); ?></dt>
  56  
  57          <dd class="moderator-listing">
  58          <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
  59              <ul id="mods-list" class="item-list single-line">
  60  
  61                  <?php while ( bp_members() ) : bp_the_member(); ?>
  62                  <li class="members-entry clearfix">
  63  
  64                      <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => '' ) ); ?>
  65                      <p class="list-title member-name">
  66                          <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
  67                      </p>
  68  
  69                      <div class="members-manage-buttons action text-links-list">
  70                          <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>
  71                          <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>
  72                      </div>
  73  
  74                  </li>
  75  
  76                  <?php endwhile; ?>
  77  
  78              </ul>
  79  
  80          <?php endif; ?>
  81      </dd>
  82      <?php endif ?>
  83  
  84  
  85      <dt class="gen-members-section section-title"><?php esc_html_e( 'Members', 'buddypress' ); ?></dt>
  86  
  87      <dd class="general-members-listing">
  88          <?php if ( bp_group_has_members( 'per_page=15&exclude_banned=0' ) ) : ?>
  89  
  90              <?php if ( bp_group_member_needs_pagination() ) : ?>
  91  
  92                  <?php bp_nouveau_pagination( 'top' ) ; ?>
  93  
  94              <?php endif; ?>
  95  
  96              <ul id="members-list" class="item-list single-line">
  97                  <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
  98  
  99                      <li class="<?php bp_group_member_css_class(); ?> members-entry clearfix">
 100                          <?php bp_group_member_avatar_mini(); ?>
 101  
 102                          <p class="list-title member-name">
 103                              <?php bp_group_member_link(); ?>
 104                              <span class="banned warn">
 105                                  <?php if ( bp_get_group_member_is_banned() ) : ?>
 106                                      <?php
 107                                      /* translators: indicates a user is banned from a group, e.g. "Mike (banned)". */
 108                                      esc_html_e( '(banned)', 'buddypress' );
 109                                      ?>
 110                                  <?php endif; ?>
 111                              </span>
 112                          </p>
 113  
 114                          <?php bp_nouveau_groups_manage_members_buttons( array( 'container' => 'div', 'container_classes' => array( 'members-manage-buttons', 'text-links-list' ), 'parent_element' => '  ' ) ) ; ?>
 115  
 116                      </li>
 117  
 118                  <?php endwhile; ?>
 119              </ul>
 120      </dd>
 121  
 122  </dl>
 123  
 124      <?php else:
 125  
 126          bp_nouveau_user_feedback( 'group-manage-members-none' );
 127  
 128      endif;
 129  
 130  endif;


Generated: Sat Aug 13 01:00:53 2022 Cross-referenced by PHPXref 0.7.1