Added new spam_flag to Accounts, replacing is_flagged_as_spam

• Added:
- new spam_flag to Accounts, replacing is_flagged_as_spam
- null/0: no spam, 1: spam, 2: safe from spam

• Updated:
- Comment, Status to reflect changes

• Todo:
- Fully remove is_flagged_as_spam
- Update SortingQueryBuilder
This commit is contained in:
Developer
2021-02-18 23:46:53 -05:00
parent bf1d00b5f8
commit 2a8ca2cd56
13 changed files with 34 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
- if current_user&.staff?
%div{ :style => "display:flex;flex-direction:row;" }
- if account.is_flagged_as_spam
- if account.is_spam?
%span{ :style => "display:inline-block;margin-right:4px;font-size:12px;background-color:#781600;border-radius:6px;color:#fff;width:40px;line-height:22px;font-weight:600;padding:2px 0 0 6px;" } SPAM
- if account.is_pro
%span{ :style => "display:inline-block;margin-right:4px;font-size:12px;background-color:#FFD700;border-radius:6px;color:#292929;width:24px;line-height:22px;font-weight:600;text-align:center;padding:2px 0 0 2px;" } P

View File

@@ -138,11 +138,11 @@
%tr
%th Is flagged as spam
%td
- if @account.is_flagged_as_spam?
- if @account.is_spam?
%span YES
- else
%span no
- if @account.is_flagged_as_spam?
- if @account.is_spam?
%td= table_link_to 'ban', 'Reset', reset_spam_admin_account_path(@account.id), method: :post