Add "disabled" user filter for admin/accounts UI (#21282)

This commit is contained in:
Jeong Arm 2022-12-16 01:30:47 +09:00 committed by GitHub
parent cedf138313
commit 3656a6b9cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -81,7 +81,7 @@ class AccountFilter
when 'suspended' when 'suspended'
Account.suspended Account.suspended
when 'disabled' when 'disabled'
accounts_with_users.merge(User.disabled) accounts_with_users.merge(User.disabled).without_suspended
when 'silenced' when 'silenced'
Account.silenced Account.silenced
when 'sensitized' when 'sensitized'

View file

@ -13,7 +13,7 @@
.filter-subset.filter-subset--with-select .filter-subset.filter-subset--with-select
%strong= t('admin.accounts.moderation.title') %strong= t('admin.accounts.moderation.title')
.input.select.optional .input.select.optional
= select_tag :status, options_for_select([[t('admin.accounts.moderation.active'), 'active'], [t('admin.accounts.moderation.silenced'), 'silenced'], [t('admin.accounts.moderation.suspended'), 'suspended'], [safe_join([t('admin.accounts.moderation.pending'), "(#{number_with_delimiter(User.pending.count)})"], ' '), 'pending']], params[:status]), prompt: I18n.t('generic.all') = select_tag :status, options_for_select([[t('admin.accounts.moderation.active'), 'active'], [t('admin.accounts.moderation.silenced'), 'silenced'], [t('admin.accounts.moderation.disabled'), 'disabled'], [t('admin.accounts.moderation.suspended'), 'suspended'], [safe_join([t('admin.accounts.moderation.pending'), "(#{number_with_delimiter(User.pending.count)})"], ' '), 'pending']], params[:status]), prompt: I18n.t('generic.all')
.filter-subset.filter-subset--with-select .filter-subset.filter-subset--with-select
%strong= t('admin.accounts.role') %strong= t('admin.accounts.role')
.input.select.optional .input.select.optional