1
0

show.html.haml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. - content_for :page_title do
  2. = @account.pretty_acct
  3. - if @account.instance_actor?
  4. .flash-message.notice
  5. %strong= t('accounts.instance_actor_flash')
  6. = render 'application/card', account: @account
  7. - account = @account
  8. - fields = account.fields
  9. - unless fields.empty? && account.note.blank?
  10. .admin-account-bio
  11. - unless fields.empty?
  12. %div
  13. .account__header__fields
  14. - fields.each do |field|
  15. %dl
  16. %dt.emojify{ title: field.name }= prerender_custom_emojis(h(field.name), account.emojis)
  17. %dd{ title: field.value, class: custom_field_classes(field) }
  18. - if field.verified?
  19. %span.verified__mark{ title: t('accounts.link_verified_on', date: l(field.verified_at)) }
  20. = fa_icon 'check'
  21. = prerender_custom_emojis(account_field_value_format(field, with_rel_me: false), account.emojis)
  22. - if account.note.present?
  23. %div
  24. .account__header__content.emojify= prerender_custom_emojis(account_bio_format(account), account.emojis)
  25. = render 'admin/accounts/counters', account: @account
  26. - if @account.local? && @account.user.nil?
  27. = link_to t('admin.accounts.unblock_email'), unblock_email_admin_account_path(@account.id), method: :post, class: 'button' if can?(:unblock_email, @account) && CanonicalEmailBlock.exists?(reference_account_id: @account.id)
  28. - else
  29. .table-wrapper
  30. %table.table.inline-table
  31. %tbody
  32. - if @account.local?
  33. = render 'admin/accounts/local_account', account: @account
  34. - else
  35. = render 'admin/accounts/remote_account', account: @account, domain_block: @domain_block
  36. = render 'admin/accounts/buttons', account: @account, deletion_request: @deletion_request
  37. %hr.spacer/
  38. - unless @warnings.empty?
  39. %h3= t 'admin.accounts.previous_strikes'
  40. %p= t('admin.accounts.previous_strikes_description_html', count: @account.previous_strikes_count)
  41. .account-strikes
  42. = render @warnings
  43. %hr.spacer/
  44. %h3= t 'admin.reports.notes.title'
  45. %p= t 'admin.reports.notes_description_html'
  46. .report-notes
  47. = render partial: 'admin/report_notes/report_note', collection: @moderation_notes
  48. = simple_form_for @account_moderation_note, url: admin_account_moderation_notes_path do |f|
  49. = f.hidden_field :target_account_id
  50. .field-group
  51. = f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6
  52. .actions
  53. = f.button :button, t('admin.account_moderation_notes.create'), type: :submit
  54. %hr.spacer/
  55. - if @account.user&.invite_request&.text.present?
  56. .speech-bubble
  57. .speech-bubble__bubble
  58. = @account.user&.invite_request&.text
  59. .speech-bubble__owner
  60. = admin_account_link_to @account
  61. = t('admin.accounts.invite_request_text')