<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][7949] trunk: Enable member sorting and pagination on group Members pages</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://buddypress.trac.wordpress.org/changeset/7949">7949</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2014-02-21 14:06:53 +0000 (Fri, 21 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Enable member sorting and pagination on group Members pages

Fixes <a href="http://buddypress.trac.wordpress.org/ticket/921">#921</a>

Props imath, boonebgorges</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpgroupsbpgroupstemplatephp">trunk/bp-groups/bp-groups-template.php</a></li>
<li><a href="#trunkbptemplatesbplegacybuddypressgroupssinglehomephp">trunk/bp-templates/bp-legacy/buddypress/groups/single/home.php</a></li>
<li><a href="#trunkbptemplatesbplegacybuddypressgroupssinglemembersphp">trunk/bp-templates/bp-legacy/buddypress/groups/single/members.php</a></li>
<li><a href="#trunkbptemplatesbplegacybuddypressfunctionsphp">trunk/bp-templates/bp-legacy/buddypress-functions.php</a></li>
<li><a href="#trunkbptemplatesbplegacycssbuddypresscss">trunk/bp-templates/bp-legacy/css/buddypress.css</a></li>
<li><a href="#trunkbptemplatesbplegacyjsbuddypressjs">trunk/bp-templates/bp-legacy/js/buddypress.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpgroupsbpgroupstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-template.php (7948 => 7949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-template.php   2014-02-21 13:50:30 UTC (rev 7948)
+++ trunk/bp-groups/bp-groups-template.php      2014-02-21 14:06:53 UTC (rev 7949)
</span><span class="lines">@@ -2028,6 +2028,12 @@
</span><span class="cx">          $this->pag_page = isset( $_REQUEST['mlpage'] ) ? intval( $_REQUEST['mlpage'] ) : $r['page'];
</span><span class="cx">          $this->pag_num  = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page;
</span><span class="cx"> 
</span><ins>+               // Assemble the base URL for pagination
+               $base_url = trailingslashit( bp_get_group_permalink( groups_get_current_group() ) . bp_current_action() );
+               if ( bp_action_variable() ) {
+                       $base_url = trailingslashit( $base_url . bp_action_variable() );
+               }
+
</ins><span class="cx">           $members_args = $r;
</span><span class="cx"> 
</span><span class="cx">          $members_args['page']     = $this->pag_page;
</span><span class="lines">@@ -2052,7 +2058,7 @@
</span><span class="cx">          }
</span><span class="cx"> 
</span><span class="cx">          $this->pag_links = paginate_links( array(
</span><del>-                       'base' => add_query_arg( 'mlpage', '%#%' ),
</del><ins>+                        'base' => add_query_arg( array( 'mlpage' => '%#%' ), $base_url ),
</ins><span class="cx">                   'format' => '',
</span><span class="cx">                  'total' => !empty( $this->pag_num ) ? ceil( $this->total_member_count / $this->pag_num ) : $this->total_member_count,
</span><span class="cx">                  'current' => $this->pag_page,
</span><span class="lines">@@ -2132,13 +2138,19 @@
</span><span class="cx"> function bp_group_has_members( $args = '' ) {
</span><span class="cx">  global $members_template;
</span><span class="cx"> 
</span><ins>+       $exclude_admins_mods = 1;
+
+       if ( bp_is_group_members() ) {
+               $exclude_admins_mods = 0;
+       }
+
</ins><span class="cx">   $r = wp_parse_args( $args, array(
</span><span class="cx">          'group_id'            => bp_get_current_group_id(),
</span><span class="cx">          'page'                => 1,
</span><span class="cx">          'per_page'            => 20,
</span><span class="cx">          'max'                 => false,
</span><span class="cx">          'exclude'             => false,
</span><del>-               'exclude_admins_mods' => 1,
</del><ins>+                'exclude_admins_mods' => $exclude_admins_mods,
</ins><span class="cx">           'exclude_banned'      => 1,
</span><span class="cx">          'group_role'          => false,
</span><span class="cx">          'search_terms'        => false,
</span><span class="lines">@@ -2324,7 +2336,58 @@
</span><span class="cx">          return $members_template->pag_links;
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+/**
+ * Output the Group members template
+ *
+ * @since BuddyPress (?)
+ *
+ * @return string html output
+ */
+function bp_groups_members_template_part() {
+       ?>
+       <div class="item-list-tabs" id="subnav" role="navigation">
+               <ul>
+                       <li class="groups-members-search" role="search">
+                               <?php bp_directory_members_search_form(); ?>
+                       </li>
</ins><span class="cx"> 
</span><ins>+                       <?php bp_groups_members_filter(); ?>
+                       <?php do_action( 'bp_members_directory_member_sub_types' ); ?>
+
+               </ul>
+       </div>
+
+       <div id="members-group-list" class="group_members dir-list">
+
+               <?php bp_get_template_part( 'groups/single/members' ); ?>
+
+       </div>
+       <?php
+}
+
+/**
+ * Output the Group members filters
+ *
+ * @since BuddyPress (?)
+ *
+ * @return string html output
+ */
+function bp_groups_members_filter() {
+       ?>
+       <li id="group_members-order-select" class="last filter">
+               <label for="group_members-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
+               <select id="group_members-order-by">
+                       <option value="last_joined"><?php _e( 'Newest', 'buddypress' ); ?></option>
+                       <option value="first_joined"><?php _e( 'Oldest', 'buddypress' ); ?></option>
+                       <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
+
+                       <?php do_action( 'bp_groups_members_order_options' ); ?>
+
+               </select>
+       </li>
+       <?php
+}
+
</ins><span class="cx"> /***************************************************************************
</span><span class="cx">  * Group Creation Process Template Tags
</span><span class="cx">  **/
</span></span></pre></div>
<a id="trunkbptemplatesbplegacybuddypressgroupssinglehomephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-templates/bp-legacy/buddypress/groups/single/home.php (7948 => 7949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-templates/bp-legacy/buddypress/groups/single/home.php   2014-02-21 13:50:30 UTC (rev 7948)
+++ trunk/bp-templates/bp-legacy/buddypress/groups/single/home.php      2014-02-21 14:06:53 UTC (rev 7949)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">                          elseif ( bp_is_active( 'activity' ) ) : bp_get_template_part( 'groups/single/activity' );
</span><span class="cx"> 
</span><span class="cx">                          // Otherwise show members
</span><del>-                               elseif ( bp_is_active( 'members'  ) ) : bp_get_template_part( 'groups/single/members'  );
</del><ins>+                                elseif ( bp_is_active( 'members'  ) ) : bp_groups_members_template_part();
</ins><span class="cx"> 
</span><span class="cx">                          endif;
</span><span class="cx">                          
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">                          elseif ( bp_is_group_activity()   ) : bp_get_template_part( 'groups/single/activity'     );
</span><span class="cx"> 
</span><span class="cx">                          // Group Members
</span><del>-                               elseif ( bp_is_group_members()    ) : bp_get_template_part( 'groups/single/members'      );
</del><ins>+                                elseif ( bp_is_group_members()    ) : bp_groups_members_template_part();
</ins><span class="cx"> 
</span><span class="cx">                          // Group Invitations
</span><span class="cx">                          elseif ( bp_is_group_invites()    ) : bp_get_template_part( 'groups/single/send-invites' );
</span></span></pre></div>
<a id="trunkbptemplatesbplegacybuddypressgroupssinglemembersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-templates/bp-legacy/buddypress/groups/single/members.php (7948 => 7949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-templates/bp-legacy/buddypress/groups/single/members.php        2014-02-21 13:50:30 UTC (rev 7948)
+++ trunk/bp-templates/bp-legacy/buddypress/groups/single/members.php   2014-02-21 14:06:53 UTC (rev 7949)
</span><span class="lines">@@ -1,17 +1,9 @@
</span><del>-<?php if ( bp_group_has_members( 'exclude_admins_mods=0' ) ) : ?>
</del><ins>+<?php if ( bp_group_has_members( bp_ajax_querystring( 'group_members' ) ) ) : ?>
</ins><span class="cx"> 
</span><span class="cx">  <?php do_action( 'bp_before_group_members_content' ); ?>
</span><span class="cx"> 
</span><del>-       <div class="item-list-tabs" id="subnav" role="navigation">
-               <ul>
</del><ins>+        <div id="pag-top" class="pagination">
</ins><span class="cx"> 
</span><del>-                       <?php do_action( 'bp_members_directory_member_sub_types' ); ?>
-
-               </ul>
-       </div>
-
-       <div id="pag-top" class="pagination no-ajax">
-
</del><span class="cx">           <div class="pag-count" id="member-count-top">
</span><span class="cx"> 
</span><span class="cx">                  <?php bp_members_pagination_count(); ?>
</span><span class="lines">@@ -63,7 +55,7 @@
</span><span class="cx"> 
</span><span class="cx">  <?php do_action( 'bp_after_group_members_list' ); ?>
</span><span class="cx"> 
</span><del>-       <div id="pag-bottom" class="pagination no-ajax">
</del><ins>+        <div id="pag-bottom" class="pagination">
</ins><span class="cx"> 
</span><span class="cx">          <div class="pag-count" id="member-count-bottom">
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbptemplatesbplegacybuddypressfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-templates/bp-legacy/buddypress-functions.php (7948 => 7949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-templates/bp-legacy/buddypress-functions.php    2014-02-21 13:50:30 UTC (rev 7948)
+++ trunk/bp-templates/bp-legacy/buddypress-functions.php       2014-02-21 14:06:53 UTC (rev 7949)
</span><span class="lines">@@ -572,8 +572,15 @@
</span><span class="cx">  if ( ! bp_current_action() )
</span><span class="cx">          bp_update_is_directory( true, bp_current_component() );
</span><span class="cx"> 
</span><ins>+       $template_part = $object . '/' . $object . '-loop';
+
+       // The template part can be overridden by the calling JS function
+       if ( ! empty( $_POST['template'] ) ) {
+               $template_part = sanitize_option( 'upload_path', $_POST['template'] );
+       }
+
</ins><span class="cx">   // Locate the object template
</span><del>-       bp_get_template_part( "$object/$object-loop" );
</del><ins>+        bp_get_template_part( $template_part );
</ins><span class="cx">   exit();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbptemplatesbplegacycssbuddypresscss"></a>
<div class="modfile"><h4>Modified: trunk/bp-templates/bp-legacy/css/buddypress.css (7948 => 7949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-templates/bp-legacy/css/buddypress.css  2014-02-21 13:50:30 UTC (rev 7948)
+++ trunk/bp-templates/bp-legacy/css/buddypress.css     2014-02-21 14:06:53 UTC (rev 7949)
</span><span class="lines">@@ -486,7 +486,8 @@
</span><span class="cx">  float: right;
</span><span class="cx">  margin: -39px 0 0 0;
</span><span class="cx"> }
</span><del>-#buddypress div.dir-search input[type=text] {
</del><ins>+#buddypress div.dir-search input[type=text],
+#buddypress li.groups-members-search input[type=text] {
</ins><span class="cx">   font-size: 90%;
</span><span class="cx">  padding: 1px 3px;
</span><span class="cx"> }
</span><span class="lines">@@ -581,7 +582,9 @@
</span><span class="cx"> #buddypress .standard-form select,
</span><span class="cx"> #buddypress .standard-form input[type=password],
</span><span class="cx"> #buddypress .dir-search input[type=search],
</span><del>-#buddypress .dir-search input[type=text] {
</del><ins>+#buddypress .dir-search input[type=text],
+#buddypress .groups-members-search input[type=search],
+#buddypress .groups-members-search input[type=text] {
</ins><span class="cx">   border: 1px solid #ccc;
</span><span class="cx">  background: #fafafa;
</span><span class="cx">  border-radius: 0;
</span></span></pre></div>
<a id="trunkbptemplatesbplegacyjsbuddypressjs"></a>
<div class="modfile"><h4>Modified: trunk/bp-templates/bp-legacy/js/buddypress.js (7948 => 7949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-templates/bp-legacy/js/buddypress.js    2014-02-21 13:50:30 UTC (rev 7948)
+++ trunk/bp-templates/bp-legacy/js/buddypress.js       2014-02-21 14:06:53 UTC (rev 7949)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx">  bp_init_activity();
</span><span class="cx"> 
</span><span class="cx">  /* Object filter and scope set. */
</span><del>-       var objects = [ 'members', 'groups', 'blogs', 'forums' ];
</del><ins>+        var objects = [ 'members', 'groups', 'blogs', 'forums', 'group_members' ];
</ins><span class="cx">   bp_init_objects( objects );
</span><span class="cx"> 
</span><span class="cx">  /* @mention Compose Scrolling */
</span><span class="lines">@@ -665,7 +665,7 @@
</span><span class="cx">  /**** Directory Search ****************************************************/
</span><span class="cx"> 
</span><span class="cx">  /* The search form on all directory pages */
</span><del>-       jq('.dir-search').on( 'click', function(event) {
</del><ins>+        jq( '.dir-search, .groups-members-search' ).on( 'click', function(event) {
</ins><span class="cx">           if ( jq(this).hasClass('no-ajax') )
</span><span class="cx">                  return;
</span><span class="cx"> 
</span><span class="lines">@@ -674,9 +674,16 @@
</span><span class="cx">          if ( target.attr('type') == 'submit' ) {
</span><span class="cx">                  var css_id = jq('.item-list-tabs li.selected').attr('id').split( '-' );
</span><span class="cx">                  var object = css_id[0];
</span><ins>+                       var template = null;
</ins><span class="cx"> 
</span><del>-                       bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope') , 'div.' + object, target.parent().children('label').children('input').val(), 1, jq.cookie('bp-' + object + '-extras') );
</del><ins>+                        // The Group Members page specifies its own template
+                       if ( 'members' == object && 'groups' == css_id[1] ) {
+                               object = 'group_members';
+                               template = 'groups/single/members';
+                       }
</ins><span class="cx"> 
</span><ins>+                       bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope') , 'div.' + object, target.parent().children('label').children('input').val(), 1, jq.cookie('bp-' + object + '-extras'), null, template );
+
</ins><span class="cx">                   return false;
</span><span class="cx">          }
</span><span class="cx">  });
</span><span class="lines">@@ -719,14 +726,28 @@
</span><span class="cx">          var scope = css_id[1];
</span><span class="cx">          var filter = jq(this).val();
</span><span class="cx">          var search_terms = false;
</span><ins>+               var template = null;
</ins><span class="cx"> 
</span><span class="cx">          if ( jq('.dir-search input').length )
</span><span class="cx">                  search_terms = jq('.dir-search input').val();
</span><span class="cx"> 
</span><ins>+               // The Group Members page has a different selector for its
+               // search terms box
+               var $gm_search = jq( '.groups-members-search input' );
+               if ( $gm_search.length ) {
+                       search_terms = $gm_search.val();
+               }
+
+               // On the Groups Members page, we specify a template
+               if ( 'members' == object && 'groups' == scope ) {
+                       object = 'group_members';
+                       template = 'groups/single/members';
+               } 
+
</ins><span class="cx">           if ( 'friends' == object )
</span><span class="cx">                  object = 'members';
</span><span class="cx"> 
</span><del>-               bp_filter_request( object, filter, scope, 'div.' + object, search_terms, 1, jq.cookie('bp-' + object + '-extras') );
</del><ins>+                bp_filter_request( object, filter, scope, 'div.' + object, search_terms, 1, jq.cookie('bp-' + object + '-extras'), null, template );
</ins><span class="cx"> 
</span><span class="cx">          return false;
</span><span class="cx">  });
</span><span class="lines">@@ -751,20 +772,35 @@
</span><span class="cx">                  var object = css_id[0];
</span><span class="cx">                  var search_terms = false;
</span><span class="cx">                  var pagination_id = jq(target).closest('.pagination-links').attr('id');
</span><ins>+                       var template = null;
</ins><span class="cx"> 
</span><span class="cx">                  var page_number = target.attr('href').split( '=' );
</span><span class="cx">                  page_number = page_number[1];
</span><span class="cx"> 
</span><ins>+                       // Search terms
</ins><span class="cx">                   if ( jq('div.dir-search input').length )
</span><span class="cx">                          search_terms = jq('.dir-search input').val();
</span><ins>+       
+                       // The Group Members page has a different selector for
+                       // its search terms box
+                       var $gm_search = jq( '.groups-members-search input' );
+                       if ( $gm_search.length ) {
+                               search_terms = $gm_search.val();
+                       }
</ins><span class="cx"> 
</span><ins>+                       // On the Groups Members page, we specify a template
+                       if ( 'members' == object && 'groups' == css_id[1] ) {
+                               object = 'group_members';
+                               template = 'groups/single/members';
+                       }
+
</ins><span class="cx">                   if ( pagination_id.indexOf( 'pag-bottom' ) !== -1 ) {
</span><span class="cx">                          var caller = 'pag-bottom';
</span><span class="cx">                  } else {
</span><span class="cx">                          var caller = null;
</span><span class="cx">                  }
</span><span class="cx"> 
</span><del>-                       bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope'), 'div.' + object, search_terms, page_number, jq.cookie('bp-' + object + '-extras'), caller );
</del><ins>+                        bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope'), 'div.' + object, search_terms, page_number, jq.cookie('bp-' + object + '-extras'), caller, template );
</ins><span class="cx"> 
</span><span class="cx">                  return false;
</span><span class="cx">          }
</span><span class="lines">@@ -963,7 +999,7 @@
</span><span class="cx">  });
</span><span class="cx"> 
</span><span class="cx">  /* Add / Remove friendship buttons */
</span><del>-       jq('#members-dir-list').on('click', '.friendship-button a', function() {
</del><ins>+        jq( '#members-dir-list, #members-group-list' ).on('click', '.friendship-button a', function() {
</ins><span class="cx">           jq(this).parent().addClass('loading');
</span><span class="cx">          var fid = jq(this).attr('id');
</span><span class="cx">          fid = fid.split('-');
</span><span class="lines">@@ -1380,7 +1416,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /* Filter the current content list (groups/members/blogs/topics) */
</span><del>-function bp_filter_request( object, filter, scope, target, search_terms, page, extras, caller ) {
</del><ins>+function bp_filter_request( object, filter, scope, target, search_terms, page, extras, caller, template ) {
</ins><span class="cx">   if ( 'activity' == object )
</span><span class="cx">          return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1409,8 +1445,9 @@
</span><span class="cx">  jq('.item-list-tabs li.selected').addClass('loading');
</span><span class="cx">  jq('.item-list-tabs select option[value="' + filter + '"]').prop( 'selected', true );
</span><span class="cx"> 
</span><del>-       if ( 'friends' == object )
</del><ins>+        if ( 'friends' == object || 'group_members' == object ) {
</ins><span class="cx">           object = 'members';
</span><ins>+       }
</ins><span class="cx"> 
</span><span class="cx">  if ( bp_ajax_request )
</span><span class="cx">          bp_ajax_request.abort();
</span><span class="lines">@@ -1423,7 +1460,8 @@
</span><span class="cx">          'search_terms': search_terms,
</span><span class="cx">          'scope': scope,
</span><span class="cx">          'page': page,
</span><del>-               'extras': extras
</del><ins>+                'extras': extras,
+               'template': template
</ins><span class="cx">   },
</span><span class="cx">  function(response)
</span><span class="cx">  {
</span></span></pre>
</div>
</div>

</body>
</html>