[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-nouveau/buddypress/common/js-templates/group-members/ -> index.php (source)

   1  <?php
   2  /**
   3   * BP Nouveau single group's membership management main template.
   4   *
   5   * This template is used to inject the BuddyPress Backbone views
   6   * dealing with a group's membership management.
   7   *
   8   * @since 5.0.0
   9   * @version 10.0.0
  10   */
  11  
  12  // Backward Compatibility for plugins still needing the placeholders to be located into this file.
  13  if ( ! did_action( '_bp_groups_print_manage_group_members_placeholders' ) ) {
  14      /**
  15       * Placeholders to inject elements of the UI
  16       * to manage Group members.
  17       *
  18       * @since 5.0.0
  19       */
  20      bp_groups_print_manage_group_members_placeholders();
  21  }
  22  ?>
  23  
  24  <script type="text/html" id="tmpl-bp-manage-members-updating">
  25      <# if ( ! data.type ) { #>
  26          <small><?php echo esc_html_x( 'Updating role... Please wait.', 'group manage members update feedback', 'buddypress' ); ?></small>
  27      <# } else if ( 'ban' === data.type ) { #>
  28          <small><?php echo esc_html_x( 'Banning member... Please wait.', 'group manage members ban feedback', 'buddypress' ); ?></small>
  29      <# } else if ( 'unban' === data.type ) { #>
  30          <small><?php echo esc_html_x( 'Unbanning member... Please wait.', 'group manage members unban feedback', 'buddypress' ); ?></small>
  31      <# } else if ( 'remove' === data.type ) { #>
  32          <small><?php echo esc_html_x( 'Removing member... Please wait.', 'group manage members remove feedback', 'buddypress' ); ?></small>
  33      <# } #>
  34  </script>
  35  
  36  <script type="text/html" id="tmpl-bp-manage-members-error">
  37     <small>{{data.message}}</small>
  38  </script>
  39  
  40  <script type="text/html" id="tmpl-bp-manage-members-header">
  41      <tr>
  42          <th><?php echo esc_html_x( 'Group Members', 'group manage members table header', 'buddypress' ); ?></th>
  43          <th><?php echo esc_html_x( 'Roles', 'group manage members table header', 'buddypress' ); ?></th>
  44      </tr>
  45  </script>
  46  
  47  <script type="text/html" id="tmpl-bp-manage-members-empty-row">
  48      <td colspan="2">
  49          <div class="bp-feedback info">
  50              <span class="bp-icon" aria-hidden="true"></span>
  51              <p><?php esc_html_e( 'No Group members were found for this request.', 'buddypress' ); ?></p>
  52          </div>
  53      </td>
  54  </script>
  55  
  56  <script type="text/html" id="tmpl-bp-manage-members-label">
  57      <# if ( data.type && 'filter' !== data.type ) { #>
  58          <?php echo esc_html_x( 'Change role for:', 'group manage members row edit', 'buddypress' ); ?>
  59      <# } else { #>
  60          <?php echo esc_html_x( 'Filter:', 'group manage members roles filter', 'buddypress' ); ?></small>
  61      <# } #>
  62  </script>
  63  
  64  <script type="text/html" id="tmpl-bp-manage-members-row">
  65      <td class="uname-column">
  66          <div class="group-member">
  67              <a href="{{{data.link}}}">
  68                  <img src="{{{data.avatar_urls.thumb}}}" alt="{{data.name}}" class="avatar profile-photo alignleft"/>
  69                  {{data.name}}
  70              </a>
  71          </div>
  72          <div class="group-member-actions row-actions">
  73              <# if ( ! data.editing && ! data.is_banned ) { #>
  74                  <span class="edit"><a href="#edit-role" data-action="edit"><?php echo esc_html_x( 'Edit', 'group member edit role link', 'buddypress' ); ?></a> | </span>
  75              <# } #>
  76              <# if ( data.editing ) { #>
  77                  <span><a href="#edit-role-abort" data-action="abort"><?php echo esc_html_x( 'Stop editing', 'group member edit role abort link', 'buddypress' ); ?></a> | </span>
  78              <# } #>
  79              <# if ( ! data.is_banned ) { #>
  80                  <span class="spam"><a href="#ban" class="submitdelete" data-action="ban"><?php echo esc_html_x( 'Ban', 'group member ban link', 'buddypress' ); ?></a> | </span>
  81              <# } else { #>
  82                  <span class="ham"><a href="#unban" data-action="unban"><?php echo esc_html_x( 'Unban', 'group member unban link', 'buddypress' ); ?></a> | </span>
  83              <# } #>
  84              <span class="delete"><a href="#remove" class="submitdelete" data-action="remove"><?php echo esc_html_x( 'Remove', 'group member ban link', 'buddypress' ); ?></a></span>
  85          </div>
  86      </td>
  87      <td class="urole-column">
  88          <# if ( ! data.editing  && ! data.managingBan && ! data.removing ) { #>
  89              {{data.role.name}}
  90          <# } else { #>
  91              <div id="edit-group-member-{{data.id}}" class="group-member-edit"><?php // Placeholder for the Edit Role Dropdown. ;?></div>
  92          <# } #>
  93      </td>
  94  </script>
  95  
  96  <script type="text/html" id="tmpl-bp-manage-members-search">
  97      <?php
  98          $button_classes = array( 'bp-button', 'bp-search' );
  99          $screen_reader_class = 'bp-screen-reader-text';
 100  
 101          if ( is_admin() ) {
 102              $button_classes[]    = 'button-secondary';
 103              $screen_reader_class = 'screen-reader-text';
 104          }
 105      ?>
 106      <label for="manage-members-search" class="<?php echo sanitize_html_class( $screen_reader_class ); ?>">
 107          <?php esc_html_e( 'Search Members', 'buddypress' ); ?>
 108      </label>
 109      <input type="search" id="manage-members-search" class="small" placeholder="<?php echo esc_attr_x( 'Search', 'search placeholder text', 'buddypress' ); ?>"/>
 110      <button type="submit" id="manage-members-search-submit" class="<?php echo join( ' ', array_map( 'sanitize_html_class', $button_classes ) ); ?>">
 111          <span class="dashicons dashicons-search" aria-hidden="true"></span>
 112          <span class="<?php echo sanitize_html_class( $screen_reader_class ); ?>"><?php echo esc_html_x( 'Search', 'button', 'buddypress' ); ?></span>
 113      </button>
 114  </script>
 115  
 116  <script type="text/html" id="tmpl-bp-manage-members-paginate">
 117      <?php
 118          $button_classes = array( 'group-members-paginate-button' );
 119          $screen_reader_class = 'bp-screen-reader-text';
 120  
 121          if ( is_admin() ) {
 122              $button_classes[]    = 'button-secondary';
 123              $screen_reader_class = 'screen-reader-text';
 124          }
 125      ?>
 126      <# if ( ! isNaN( data.currentPage ) && ! isNaN( data.totalPages ) ) { #>
 127          <# if ( 1 !== data.currentPage && data.totalPages ) { #>
 128              <button class="<?php echo join( ' ', array_map( 'sanitize_html_class', $button_classes ) ); ?>" data-page="{{data.prevPage}}">
 129                  <span class="dashicons dashicons-arrow-left"></span>
 130                  <span class="<?php echo sanitize_html_class( $screen_reader_class ); ?>"><?php echo esc_html_x( 'Prev.', 'link', 'buddypress' ); ?></span>
 131              </button>
 132          <# } #>
 133          <# if ( data.totalPages !== data.currentPage ) { #>
 134              <button class="<?php echo join( ' ', array_map( 'sanitize_html_class', $button_classes ) ); ?>" data-page="{{data.nextPage}}">
 135                  <span class="<?php echo sanitize_html_class( $screen_reader_class ); ?>"><?php echo esc_html_x( 'Next', 'link', 'buddypress' ); ?></span>
 136                  <span class="dashicons dashicons-arrow-right"></span>
 137              </button>
 138          <# } #>
 139      <# } #>
 140  </script>


Generated: Sun Apr 21 01:01:03 2024 Cross-referenced by PHPXref 0.7.1