Browse Source

Change how unconfirmed accounts are displayed in admin UI (#17874)

Fix #17815
closed-social-glitch-2
Eugen Rochko 2 years ago
committed by GitHub
parent
commit
2dd30804b6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions
  1. +1
    -1
      app/models/account.rb
  2. +5
    -1
      app/models/user.rb
  3. +1
    -1
      app/views/admin/accounts/_account.html.haml

+ 1
- 1
app/models/account.rb View File

@ -128,13 +128,13 @@ class Account < ApplicationRecord
:approved?,
:pending?,
:disabled?,
:unconfirmed?,
:unconfirmed_or_pending?,
:role,
:admin?,
:moderator?,
:staff?,
:locale,
:hides_network?,
:shows_application?,
to: :user,
prefix: true,

+ 5
- 1
app/models/user.rb View File

@ -208,8 +208,12 @@ class User < ApplicationRecord
confirmed? && approved? && !disabled? && !account.suspended? && !account.memorial? && account.moved_to_account_id.nil?
end
def unconfirmed?
!confirmed?
end
def unconfirmed_or_pending?
!(confirmed? && approved?)
unconfirmed? || pending?
end
def inactive_message

+ 1
- 1
app/views/admin/accounts/_account.html.haml View File

@ -1,4 +1,4 @@
.batch-table__row{ class: [!account.suspended? && account.user_pending? && 'batch-table__row--attention', account.suspended? && 'batch-table__row--muted'] }
.batch-table__row{ class: [!account.suspended? && account.user_pending? && 'batch-table__row--attention', (account.suspended? || account.user_unconfirmed?) && 'batch-table__row--muted'] }
%label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
= f.check_box :account_ids, { multiple: true, include_hidden: false }, account.id
.batch-table__row__content.batch-table__row__content--unpadded

Loading…
Cancel
Save