logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

show.html.haml (8596B)


  1. - content_for :page_title do
  2. = @account.acct
  3. .table-wrapper
  4. %table.table
  5. %tbody
  6. %tr
  7. %th= t('admin.accounts.username')
  8. %td= @account.username
  9. %tr
  10. %th= t('admin.accounts.domain')
  11. %td= @account.domain
  12. %tr
  13. %th= t('admin.accounts.display_name')
  14. %td= @account.display_name
  15. %tr
  16. %th= t('admin.accounts.avatar')
  17. %th
  18. = link_to @account.avatar.url(:original) do
  19. = image_tag @account.avatar.url(:original), alt: '', width: 40, height: 40, class: 'avatar'
  20. - if @account.local? && @account.avatar?
  21. = table_link_to 'trash', t('admin.accounts.remove_avatar'), remove_avatar_admin_account_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:remove_avatar, @account)
  22. - if @account.local?
  23. %tr
  24. %th= t('admin.accounts.role')
  25. %td
  26. - if @account.user.nil?
  27. = t("admin.accounts.moderation.suspended")
  28. - else
  29. = t("admin.accounts.roles.#{@account.user&.role}")
  30. = table_link_to 'angle-double-up', t('admin.accounts.promote'), promote_admin_account_role_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:promote, @account.user)
  31. = table_link_to 'angle-double-down', t('admin.accounts.demote'), demote_admin_account_role_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:demote, @account.user)
  32. %tr
  33. %th= t('admin.accounts.email')
  34. %td
  35. = @account.user_email
  36. - if @account.user_confirmed?
  37. = fa_icon('check')
  38. = table_link_to 'edit', t('admin.accounts.change_email.label'), admin_account_change_email_path(@account.id) if can?(:change_email, @account.user)
  39. - if @account.user_unconfirmed_email.present?
  40. %th= t('admin.accounts.unconfirmed_email')
  41. %td
  42. = @account.user_unconfirmed_email
  43. %tr
  44. %th= t('admin.accounts.login_status')
  45. %td
  46. - if @account.user&.disabled?
  47. = t('admin.accounts.disabled')
  48. = table_link_to 'unlock', t('admin.accounts.enable'), enable_admin_account_path(@account.id), method: :post if can?(:enable, @account.user)
  49. - else
  50. = t('admin.accounts.enabled')
  51. = table_link_to 'lock', t('admin.accounts.disable'), disable_admin_account_path(@account.id), method: :post if can?(:disable, @account.user)
  52. %tr
  53. %th= t('admin.accounts.most_recent_ip')
  54. %td= @account.user_current_sign_in_ip
  55. %tr
  56. %th= t('admin.accounts.most_recent_activity')
  57. %td
  58. - if @account.user_current_sign_in_at
  59. %time.formatted{ datetime: @account.user_current_sign_in_at.iso8601, title: l(@account.user_current_sign_in_at) }
  60. = l @account.user_current_sign_in_at
  61. - else
  62. Never
  63. - else
  64. %tr
  65. %th= t('admin.accounts.profile_url')
  66. %td= link_to @account.url, @account.url
  67. %tr
  68. %th= t('admin.accounts.protocol')
  69. %td= @account.protocol.humanize
  70. %tr
  71. %th= t('admin.accounts.follows')
  72. %td= @account.following_count
  73. %tr
  74. %th= t('admin.accounts.followers')
  75. %td= @account.followers_count
  76. %tr
  77. %th= t('admin.accounts.statuses')
  78. %td= link_to @account.statuses_count, admin_account_statuses_path(@account.id)
  79. %tr
  80. %th= t('admin.accounts.media_attachments')
  81. %td
  82. = link_to @account.media_attachments.count, admin_account_statuses_path(@account.id, { media: true })
  83. = surround '(', ')' do
  84. = number_to_human_size @account.media_attachments.sum('file_file_size')
  85. %tr
  86. %th= t('.created_reports')
  87. %td= link_to pluralize(@account.reports.count, t('.report')), admin_reports_path(account_id: @account.id)
  88. %tr
  89. %th= t('.targeted_reports')
  90. %td= link_to pluralize(@account.targeted_reports.count, t('.report')), admin_reports_path(target_account_id: @account.id)
  91. %div{ style: 'overflow: hidden' }
  92. %div{ style: 'float: right' }
  93. - if @account.local?
  94. = link_to t('admin.accounts.reset_password'), admin_account_reset_path(@account.id), method: :create, class: 'button' if can?(:reset_password, @account.user)
  95. - if @account.user&.otp_required_for_login?
  96. = link_to t('admin.accounts.disable_two_factor_authentication'), admin_user_two_factor_authentication_path(@account.user.id), method: :delete, class: 'button' if can?(:disable_2fa, @account.user)
  97. - unless @account.memorial?
  98. = link_to t('admin.accounts.memorialize'), memorialize_admin_account_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button' if can?(:memorialize, @account)
  99. - else
  100. = link_to t('admin.accounts.redownload'), redownload_admin_account_path(@account.id), method: :post, class: 'button' if can?(:redownload, @account)
  101. %div{ style: 'float: left' }
  102. - if @account.silenced?
  103. = link_to t('admin.accounts.undo_silenced'), admin_account_silence_path(@account.id), method: :delete, class: 'button' if can?(:unsilence, @account)
  104. - else
  105. = link_to t('admin.accounts.silence'), admin_account_silence_path(@account.id), method: :post, class: 'button' if can?(:silence, @account)
  106. - if @account.local?
  107. - unless @account.user_confirmed?
  108. = link_to t('admin.accounts.confirm'), admin_account_confirmation_path(@account.id), method: :post, class: 'button' if can?(:confirm, @account.user)
  109. - if @account.suspended?
  110. = link_to t('admin.accounts.undo_suspension'), admin_account_suspension_path(@account.id), method: :delete, class: 'button' if can?(:unsuspend, @account)
  111. - else
  112. = link_to t('admin.accounts.perform_full_suspension'), admin_account_suspension_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button' if can?(:suspend, @account)
  113. - if !@account.local? && @account.hub_url.present?
  114. %hr
  115. %h3 OStatus
  116. .table-wrapper
  117. %table.table
  118. %tbody
  119. %tr
  120. %th= t('admin.accounts.feed_url')
  121. %td= link_to @account.remote_url, @account.remote_url
  122. %tr
  123. %th= t('admin.accounts.push_subscription_expires')
  124. %td
  125. - if @account.subscribed?
  126. %time.formatted{ datetime: @account.subscription_expires_at.iso8601, title: l(@account.subscription_expires_at) }
  127. = l @account.subscription_expires_at
  128. - else
  129. = t('admin.accounts.not_subscribed')
  130. %tr
  131. %th= t('admin.accounts.salmon_url')
  132. %td= link_to @account.salmon_url, @account.salmon_url
  133. %div{ style: 'overflow: hidden' }
  134. %div{ style: 'float: right' }
  135. = link_to @account.subscribed? ? t('admin.accounts.resubscribe') : t('admin.accounts.subscribe'), subscribe_admin_account_path(@account.id), method: :post, class: 'button' if can?(:subscribe, @account)
  136. - if @account.subscribed?
  137. = link_to t('admin.accounts.unsubscribe'), unsubscribe_admin_account_path(@account.id), method: :post, class: 'button negative' if can?(:unsubscribe, @account)
  138. - if !@account.local? && @account.inbox_url.present?
  139. %hr
  140. %h3 ActivityPub
  141. .table-wrapper
  142. %table.table
  143. %tbody
  144. %tr
  145. %th= t('admin.accounts.inbox_url')
  146. %td= link_to @account.inbox_url, @account.inbox_url
  147. %tr
  148. %th= t('admin.accounts.outbox_url')
  149. %td= link_to @account.outbox_url, @account.outbox_url
  150. %tr
  151. %th= t('admin.accounts.shared_inbox_url')
  152. %td= link_to @account.shared_inbox_url, @account.shared_inbox_url
  153. %tr
  154. %th= t('admin.accounts.followers_url')
  155. %td= link_to @account.followers_url, @account.followers_url
  156. %hr
  157. %h3= t('admin.accounts.moderation_notes')
  158. = simple_form_for @account_moderation_note, url: admin_account_moderation_notes_path do |f|
  159. = render 'shared/error_messages', object: @account_moderation_note
  160. = f.input :content
  161. = f.hidden_field :target_account_id
  162. .actions
  163. = f.button :button, t('admin.account_moderation_notes.create'), type: :submit
  164. .table-wrapper
  165. %table.table
  166. %thead
  167. %tr
  168. %th
  169. %th= t('admin.account_moderation_notes.account')
  170. %th= t('admin.account_moderation_notes.created_at')
  171. %tbody
  172. = render @moderation_notes