Change admin accounts default sort to most recent (#8813)
This commit is contained in:
parent
7fe137d2f7
commit
e645ae9561
6 changed files with 12 additions and 12 deletions
|
@ -95,7 +95,7 @@ module Admin
|
|||
:remote,
|
||||
:by_domain,
|
||||
:silenced,
|
||||
:recent,
|
||||
:alphabetic,
|
||||
:suspended,
|
||||
:username,
|
||||
:display_name,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Admin::FilterHelper
|
||||
ACCOUNT_FILTERS = %i(local remote by_domain silenced suspended recent username display_name email ip staff).freeze
|
||||
ACCOUNT_FILTERS = %i(local remote by_domain silenced suspended alphabetic username display_name email ip staff).freeze
|
||||
REPORT_FILTERS = %i(resolved account_id target_account_id).freeze
|
||||
INVITE_FILTER = %i(available expired).freeze
|
||||
CUSTOM_EMOJI_FILTERS = %i(local remote by_domain shortcode).freeze
|
||||
|
|
|
@ -8,7 +8,7 @@ class AccountFilter
|
|||
end
|
||||
|
||||
def results
|
||||
scope = Account.alphabetic
|
||||
scope = Account.recent
|
||||
|
||||
params.each do |key, value|
|
||||
scope.merge!(scope_for(key, value)) if value.present?
|
||||
|
@ -29,8 +29,8 @@ class AccountFilter
|
|||
Account.where(domain: value)
|
||||
when 'silenced'
|
||||
Account.silenced
|
||||
when 'recent'
|
||||
Account.recent
|
||||
when 'alphabetic'
|
||||
Account.reorder(nil).alphabetic
|
||||
when 'suspended'
|
||||
Account.suspended
|
||||
when 'username'
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
.filter-subset
|
||||
%strong= t('admin.accounts.order.title')
|
||||
%ul
|
||||
%li= filter_link_to t('admin.accounts.order.alphabetic'), recent: nil
|
||||
%li= filter_link_to t('admin.accounts.order.most_recent'), recent: '1'
|
||||
%li= filter_link_to t('admin.accounts.order.most_recent'), alphabetic: nil
|
||||
%li= filter_link_to t('admin.accounts.order.alphabetic'), alphabetic: '1'
|
||||
|
||||
= form_tag admin_accounts_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue