Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7175 closed enhancement (fixed)

Display and filter by group type on Dashboard > Groups

Reported by: mercime's profile mercime Owned by: dcavins's profile dcavins
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Groups Keywords:
Cc:

Description

This adds a corresponding Group Type implementation of the prospective Member Type display and filter in wp-admin per #6060. To rephrase what Boone posted in that ticket:

Now that we support group types in #6784 and have an admin UI in the Edit Group screen to view/set the group type on an individual basis, we should consider the following enhancement to Dashboard > Groups:

  • Group Type (sortable) column
  • Ability to filter by Group Type. Would be great if the filter method used (either ala Role Links or dropdown) would be similar to what would be implemented for the Member Type filter.

Attachments (1)

7175.1.patch (9.6 KB) - added by dcavins 8 years ago.
Add type display and bulk change handling to the WP Admin groups list table.

Download all attachments as: .zip

Change History (9)

#1 @DJPaul
8 years ago

  • Milestone changed from Awaiting Review to Future Release

#2 @mercime
8 years ago

Related:
#7179 UI to Add New Group Type in wp-admin
#7180 UI for All Group Types screen in wp-admin

@dcavins
8 years ago

Add type display and bulk change handling to the WP Admin groups list table.

This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.


8 years ago

#4 follow-up: @DJPaul
8 years ago

  • Milestone changed from Future Release to 2.7

Since you asked:

  • bp_current_user_can vs current_user_can :)
  • strict comparision operators please :)
  • with in_array, please set the third parameter to true (good habit to get into) :)
  • In column_content_group_type(), escape the singular_name label within that link. :)
  • $columns[ 'bp_group_type' ] should be $columns['bp_group_type']. The spacing is only needed if you're using an variable to access an array element, e.g. $my_array[ $my_var ]. :)
  • In add_group_type_bulk_change_select(), please escape the all the things. :)

:)

#5 in reply to: ↑ 4 @dcavins
8 years ago

Replying to DJPaul:

Since you asked:

  • bp_current_user_can vs current_user_can :)
  • strict comparision operators please :)
  • with in_array, please set the third parameter to true (good habit to get into) :)
  • In column_content_group_type(), escape the singular_name label within that link. :)
  • $columns[ 'bp_group_type' ] should be $columns['bp_group_type']. The spacing is only needed if you're using an variable to access an array element, e.g. $my_array[ $my_var ]. :)
  • In add_group_type_bulk_change_select(), please escape the all the things. :)

:)

Thanks for taking the time to read over the patch! That's very helpful.

#6 @dcavins
8 years ago

  • Owner set to dcavins
  • Resolution set to fixed
  • Status changed from new to closed

In 11139:

WP Admin Groups List: Add group type bulk change controls and filters.

Add a dropdown select to change the group type of many groups in
bulk. Also add a new column, “Group Type,” showing the group’s
assigned group type as a link that leads to a filtered view of the
groups list table, much like a tag link on the posts table works.

Props dcavins, djpaul.

Fixes #7175.

#7 @dcavins
8 years ago

In 11141:

Correct misuse of escaping functions.

Don’t use esc_html_e() when you mean echo esc_html().

Anti-props dcavins.

See #6060, #7175.

#8 @dcavins
8 years ago

In 11162:

BP Groups Admin Types: Correct variable usage.

Reorganize the logic in
BP_Groups_List_Table::column_content_group_type()
to ensure that the output variable exists before we
attempt to apply filters to it.

Props mercime.

See #7175.

Note: See TracTickets for help on using tickets.