Added account_flags_block partial to admin pages
• Added: - account_flags_block partial to admin pages (groups, accounts, reports) so admin/moderators can easily see pro, verified, investor, donor, spam flags of an account
This commit is contained in:
parent
c7df309df5
commit
fa74c34095
|
@ -9,14 +9,4 @@
|
|||
%td
|
||||
%samp= number_with_delimiter account.statuses.count
|
||||
%td
|
||||
%div{ :style => "display:flex;flex-direction:row;" }
|
||||
- if account.is_flagged_as_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
|
||||
- if account.is_verified
|
||||
%span{ :style => "display:inline-block;margin-right:4px;font-size:12px;background-color:#fff;border-radius:6px;color:#292929;width:24px;line-height:22px;font-weight:600;text-align:center;padding:2px 0 0 2px;" } V
|
||||
- if account.is_donor
|
||||
%span{ :style => "display:inline-block;margin-right:4px;font-size:12px;background-color:#4EA6FF;border-radius:6px;color:#292929;width:24px;line-height:22px;font-weight:600;text-align:center;padding:2px 0 0 2px;" } D
|
||||
- if account.is_investor
|
||||
%span{ :style => "display:inline-block;font-size:12px;background-color:#6DD900;border-radius:6px;color:#292929;width:24px;line-height:22px;font-weight:600;text-align:center;padding:2px 0 0 2px;" } I
|
||||
= render 'admin/accounts/account_flags_block', :account => account
|
|
@ -0,0 +1,11 @@
|
|||
%div{ :style => "display:flex;flex-direction:row;" }
|
||||
- if account.is_flagged_as_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
|
||||
- if account.is_verified
|
||||
%span{ :style => "display:inline-block;margin-right:4px;font-size:12px;background-color:#fff;border-radius:6px;color:#292929;width:24px;line-height:22px;font-weight:600;text-align:center;padding:2px 0 0 2px;" } V
|
||||
- if account.is_donor
|
||||
%span{ :style => "display:inline-block;margin-right:4px;font-size:12px;background-color:#4EA6FF;border-radius:6px;color:#292929;width:24px;line-height:22px;font-weight:600;text-align:center;padding:2px 0 0 2px;" } D
|
||||
- if account.is_investor
|
||||
%span{ :style => "display:inline-block;font-size:12px;background-color:#6DD900;border-radius:6px;color:#292929;width:24px;line-height:22px;font-weight:600;text-align:center;padding:2px 0 0 2px;" } I
|
|
@ -85,14 +85,16 @@
|
|||
%th Role
|
||||
%tbody
|
||||
%tr
|
||||
%td
|
||||
%td{style: "display:flex;flex-direction:row;align-items:center;"}
|
||||
= admin_account_link_to(@group.account)
|
||||
%div{style:"margin-left:10px;"}= render 'admin/accounts/account_flags_block', :account => @group.account
|
||||
%td
|
||||
%span Group Creator
|
||||
- @admins.each do |acct|
|
||||
%tr
|
||||
%td
|
||||
%td{style: "display:flex;flex-direction:row;align-items:center;"}
|
||||
= admin_account_link_to(acct.account)
|
||||
%div{style:"margin-left:10px;"}= render 'admin/accounts/account_flags_block', :account => acct.account
|
||||
%td
|
||||
%span Admin
|
||||
- @mods.each do |acct|
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
%th= t('admin.reports.reported_account')
|
||||
%td= admin_account_link_to @report.target_account
|
||||
%td= table_link_to 'flag', pluralize(@report.target_account.targeted_reports.count, t('admin.reports.account.report')), admin_reports_path(target_account_id: @report.target_account.id)
|
||||
%td= table_link_to 'file', pluralize(@report.target_account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_reports_path(target_account_id: @report.target_account.id)
|
||||
%td= render 'admin/accounts/account_flags_block', :account => @report.target_account
|
||||
%tr
|
||||
%th= t('admin.reports.reported_by')
|
||||
- if @report.account.local?
|
||||
%td= admin_account_link_to @report.account
|
||||
%td= table_link_to 'flag', pluralize(@report.account.targeted_reports.count, t('admin.reports.account.report')), admin_reports_path(target_account_id: @report.account.id)
|
||||
%td= table_link_to 'file', pluralize(@report.account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_reports_path(target_account_id: @report.account.id)
|
||||
%td= render 'admin/accounts/account_flags_block', :account => @report.account
|
||||
- else
|
||||
%td{ colspan: 3 }= @report.account.domain
|
||||
%tr
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
= image_tag account.avatar.url, alt: '', width: 48, height: 48, class: 'u-photo'
|
||||
.display-name
|
||||
%span{id: "default_account_display_name", style: "display:none;"}= account.username
|
||||
%bdi
|
||||
%span{style: "display:flex;flex-direction:row;align-items:center;"}
|
||||
%strong.emojify.p-name= display_name(account, custom_emojify: true)
|
||||
%div{style: "margin-left:auto;"}
|
||||
= render 'admin/accounts/account_flags_block', :account => @account
|
||||
%span
|
||||
= acct(account)
|
||||
= fa_icon('lock') if account.locked?
|
||||
|
|
Loading…
Reference in New Issue