Collapse posts/collections in moderation interface

When none are present.
pull/37929/head
David Roetzel 4 days ago
parent 4d2ca8c92a
commit d51c5d08c6
No known key found for this signature in database

@ -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;

@ -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/

@ -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:

Loading…
Cancel
Save