diff --git a/app/javascript/styles/mastodon/admin.scss b/app/javascript/styles/mastodon/admin.scss index 7cb5406f098..dd95f4e49b3 100644 --- a/app/javascript/styles/mastodon/admin.scss +++ b/app/javascript/styles/mastodon/admin.scss @@ -378,6 +378,15 @@ $content-width: 840px; } } + details > summary { + text-transform: uppercase; + font-size: 13px; + font-weight: 700; + color: var(--color-text-secondary); + padding-top: 24px; + margin-bottom: 8px; + } + @media screen and (max-width: $no-columns-breakpoint) { display: block; diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index 7ea690dc347..2d20b6a9693 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -41,41 +41,43 @@ %p = t 'admin.reports.statuses_description_html' -%h4 - = t 'admin.reports.statuses' - -= form_with model: @form, url: batch_admin_account_statuses_path(@report.target_account_id, report_id: @report.id) do |f| - .batch-table - .batch-table__toolbar - %label.batch-table__toolbar__select.batch-checkbox-all - = check_box_tag :batch_checkbox_all, nil, false - .batch-table__toolbar__actions - = link_to safe_join([material_symbol('add'), t('admin.reports.add_to_report')]), - admin_account_statuses_path(@report.target_account_id, report_id: @report.id), - class: 'table-action-link' - - if !@statuses.empty? && @report.unresolved? - = f.button safe_join([material_symbol('close'), t('admin.statuses.batch.remove_from_report')]), name: :remove_from_report, class: 'table-action-link', type: :submit - .batch-table__body - - if @statuses.empty? - = nothing_here 'nothing-here--under-tabs' - - else - = render partial: 'admin/shared/status_batch_row', collection: @statuses, as: :status, locals: { f: f } +%details{ open: @report.status_ids.any? } + %summary + = t 'admin.reports.statuses', count: @report.status_ids.size -- if Mastodon::Feature.collections_enabled? - %h4 - = t 'admin.reports.collections' - - %form + = form_with model: @form, url: batch_admin_account_statuses_path(@report.target_account_id, report_id: @report.id) do |f| .batch-table .batch-table__toolbar %label.batch-table__toolbar__select.batch-checkbox-all - -# = check_box_tag :batch_checkbox_all, nil, false + = check_box_tag :batch_checkbox_all, nil, false .batch-table__toolbar__actions + = link_to safe_join([material_symbol('add'), t('admin.reports.add_to_report')]), + admin_account_statuses_path(@report.target_account_id, report_id: @report.id), + class: 'table-action-link' + - if !@statuses.empty? && @report.unresolved? + = f.button safe_join([material_symbol('close'), t('admin.statuses.batch.remove_from_report')]), name: :remove_from_report, class: 'table-action-link', type: :submit .batch-table__body - - if @report.collections.empty? + - if @statuses.empty? = nothing_here 'nothing-here--under-tabs' - else - = render partial: 'admin/shared/collection_batch_row', collection: @report.collections, as: :collection + = render partial: 'admin/shared/status_batch_row', collection: @statuses, as: :status, locals: { f: f } + +- if Mastodon::Feature.collections_enabled? + %details{ open: @report.collections.any? } + %summary + = t 'admin.reports.collections', count: @report.collections.size + + %form + .batch-table + .batch-table__toolbar + %label.batch-table__toolbar__select.batch-checkbox-all + -# = check_box_tag :batch_checkbox_all, nil, false + .batch-table__toolbar__actions + .batch-table__body + - if @report.collections.empty? + = nothing_here 'nothing-here--under-tabs' + - else + = render partial: 'admin/shared/collection_batch_row', collection: @report.collections, as: :collection - if @report.unresolved? %hr.spacer/ diff --git a/config/locales/en.yml b/config/locales/en.yml index 71c559d7381..93b8d4088e7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -689,7 +689,7 @@ en: cancel: Cancel category: Category category_description_html: The reason this account and/or content was reported will be cited in communication with the reported account - collections: Collections + collections: Collections (%{count}) comment: none: None comment_description_html: 'To provide more information, %{name} wrote:' @@ -725,7 +725,7 @@ en: resolved_msg: Report successfully resolved! skip_to_actions: Skip to actions status: Status - statuses: Posts + statuses: Posts (%{count}) statuses_description_html: Offending content will be cited in communication with the reported account summary: action_preambles: