Extract partials from admin/reports/show
view (#27427)
This commit is contained in:
parent
8d0f12f776
commit
33b073f77d
4 changed files with 126 additions and 127 deletions
46
app/views/admin/reports/_header_card.html.haml
Normal file
46
app/views/admin/reports/_header_card.html.haml
Normal file
|
@ -0,0 +1,46 @@
|
|||
.report-header__card
|
||||
.account-card
|
||||
.account-card__header
|
||||
= image_tag report.target_account.header.url, alt: ''
|
||||
.account-card__title
|
||||
.account-card__title__avatar
|
||||
= image_tag report.target_account.avatar.url, alt: ''
|
||||
.display-name
|
||||
%bdi
|
||||
%strong.emojify.p-name= display_name(report.target_account, custom_emojify: true)
|
||||
%span
|
||||
= acct(report.target_account)
|
||||
= fa_icon('lock') if report.target_account.locked?
|
||||
- if report.target_account.note.present?
|
||||
.account-card__bio.emojify
|
||||
= prerender_custom_emojis(account_bio_format(report.target_account), report.target_account.emojis)
|
||||
.account-card__actions
|
||||
.account-card__counters
|
||||
.account-card__counters__item
|
||||
= friendly_number_to_human report.target_account.statuses_count
|
||||
%small= t('accounts.posts', count: report.target_account.statuses_count).downcase
|
||||
.account-card__counters__item
|
||||
= friendly_number_to_human report.target_account.followers_count
|
||||
%small= t('accounts.followers', count: report.target_account.followers_count).downcase
|
||||
.account-card__counters__item
|
||||
= friendly_number_to_human report.target_account.following_count
|
||||
%small= t('accounts.following', count: report.target_account.following_count).downcase
|
||||
.account-card__actions__button
|
||||
= link_to t('admin.reports.view_profile'), admin_account_path(report.target_account_id), class: 'button'
|
||||
.report-header__details.report-header__details--horizontal
|
||||
.report-header__details__item
|
||||
.report-header__details__item__header
|
||||
%strong= t('admin.accounts.joined')
|
||||
.report-header__details__item__content
|
||||
%time.time-ago{ datetime: report.target_account.created_at.iso8601, title: l(report.target_account.created_at) }= l report.target_account.created_at
|
||||
.report-header__details__item
|
||||
.report-header__details__item__header
|
||||
%strong= t('accounts.last_active')
|
||||
.report-header__details__item__content
|
||||
- if report.target_account.last_status_at.present?
|
||||
%time.time-ago{ datetime: report.target_account.last_status_at.to_date.iso8601, title: l(report.target_account.last_status_at.to_date) }= l report.target_account.last_status_at
|
||||
.report-header__details__item
|
||||
.report-header__details__item__header
|
||||
%strong= t('admin.accounts.strikes')
|
||||
.report-header__details__item__content
|
||||
= report.target_account.previous_strikes_count
|
Loading…
Add table
Add a link
Reference in a new issue