Improve admin UI for accounts (#7360)
* Improve design of account statuses admin UI (consistent with reports) * Make account moderation notes look consistent with report notes * i18n-tasks remove-unused * Fix code style issues * Fix tests
This commit is contained in:
parent
660db468c0
commit
c7d1a2e400
44 changed files with 77 additions and 446 deletions
|
@ -2,7 +2,7 @@
|
|||
= @account.acct
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%table.table.inline-table
|
||||
%tbody
|
||||
%tr
|
||||
%th= t('admin.accounts.username')
|
||||
|
@ -73,17 +73,17 @@
|
|||
|
||||
%tr
|
||||
%th= t('admin.accounts.follows')
|
||||
%td= @account.following_count
|
||||
%td= number_to_human @account.following_count
|
||||
%tr
|
||||
%th= t('admin.accounts.followers')
|
||||
%td= @account.followers_count
|
||||
%td= number_to_human @account.followers_count
|
||||
%tr
|
||||
%th= t('admin.accounts.statuses')
|
||||
%td= link_to @account.statuses_count, admin_account_statuses_path(@account.id)
|
||||
%td= link_to number_to_human(@account.statuses_count), admin_account_statuses_path(@account.id)
|
||||
%tr
|
||||
%th= t('admin.accounts.media_attachments')
|
||||
%td
|
||||
= link_to @account.media_attachments.count, admin_account_statuses_path(@account.id, { media: true })
|
||||
= link_to number_to_human(@account.media_attachments.count), admin_account_statuses_path(@account.id, { media: true })
|
||||
= surround '(', ')' do
|
||||
= number_to_human_size @account.media_attachments.sum('file_file_size')
|
||||
%tr
|
||||
|
@ -120,11 +120,12 @@
|
|||
= 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)
|
||||
|
||||
- if !@account.local? && @account.hub_url.present?
|
||||
%hr
|
||||
%hr.spacer/
|
||||
|
||||
%h3 OStatus
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%table.table.inline-table
|
||||
%tbody
|
||||
%tr
|
||||
%th= t('admin.accounts.feed_url')
|
||||
|
@ -148,11 +149,12 @@
|
|||
= link_to t('admin.accounts.unsubscribe'), unsubscribe_admin_account_path(@account.id), method: :post, class: 'button negative' if can?(:unsubscribe, @account)
|
||||
|
||||
- if !@account.local? && @account.inbox_url.present?
|
||||
%hr
|
||||
%hr.spacer/
|
||||
|
||||
%h3 ActivityPub
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%table.table.inline-table
|
||||
%tbody
|
||||
%tr
|
||||
%th= t('admin.accounts.inbox_url')
|
||||
|
@ -167,24 +169,15 @@
|
|||
%th= t('admin.accounts.followers_url')
|
||||
%td= link_to @account.followers_url, @account.followers_url
|
||||
|
||||
%hr
|
||||
%h3= t('admin.accounts.moderation_notes')
|
||||
%hr.spacer/
|
||||
|
||||
= render @moderation_notes
|
||||
|
||||
= simple_form_for @account_moderation_note, url: admin_account_moderation_notes_path do |f|
|
||||
= render 'shared/error_messages', object: @account_moderation_note
|
||||
|
||||
= f.input :content
|
||||
= f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6
|
||||
= f.hidden_field :target_account_id
|
||||
|
||||
.actions
|
||||
= f.button :button, t('admin.account_moderation_notes.create'), type: :submit
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th
|
||||
%th= t('admin.account_moderation_notes.account')
|
||||
%th= t('admin.account_moderation_notes.created_at')
|
||||
%tbody
|
||||
= render @moderation_notes
|
||||
= f.button :button, t('admin.account_moderation_notes.create'), type: :submit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue