mirror of https://github.com/mastodon/mastodon
69 lines
3.0 KiB
Plaintext
69 lines
3.0 KiB
Plaintext
- content_for :page_title do
|
|
= t('admin.reports.title')
|
|
|
|
= form_with url: admin_reports_url, method: :get, class: :simple_form do |form|
|
|
.filters
|
|
.filter-subset.filter-subset--with-select
|
|
%strong= t('admin.reports.status')
|
|
.input.select.optional
|
|
= form.select :status,
|
|
options_for_select(admin_reports_status_options, params[:status])
|
|
.filter-subset.filter-subset--with-select
|
|
%strong= t('admin.reports.category')
|
|
.input.select.optional
|
|
= form.select :category,
|
|
options_for_select(admin_reports_category_options, params[:category]),
|
|
prompt: I18n.t('generic.all')
|
|
.filter-subset.filter-subset--with-select
|
|
%strong= t('admin.reports.target_origin')
|
|
.input.select.optional
|
|
= form.select :target_origin,
|
|
options_for_select(admin_reports_target_origin_options, params[:target_origin]),
|
|
prompt: t('admin.accounts.location.all')
|
|
.filter-subset.filter-subset--with-select
|
|
%strong= t('admin.reports.origin')
|
|
.input.select.optional
|
|
= form.text_field :by_domain,
|
|
value: params[:by_domain],
|
|
class: 'string optional',
|
|
placeholder: 'example.com'
|
|
|
|
= form_with model: @form, url: batch_admin_reports_path do |f|
|
|
= hidden_field_tag :page, params[:page] || 1
|
|
= hidden_field_tag :select_all_matching, '0'
|
|
|
|
- ReportFilter::KEYS.each do |key|
|
|
= hidden_field_tag key, params[key] if params[key].present?
|
|
|
|
.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
|
|
- if can?(:update, :report)
|
|
= f.button safe_join([material_symbol('person'), t('admin.reports.assign_to_self')]),
|
|
class: 'table-action-link',
|
|
data: { confirm: t('admin.reports.are_you_sure') },
|
|
name: :assign_to_self,
|
|
type: :submit
|
|
= f.button safe_join([material_symbol('done'), t('admin.reports.mark_as_resolved')]),
|
|
class: 'table-action-link',
|
|
data: { confirm: t('admin.reports.are_you_sure') },
|
|
name: :resolve,
|
|
type: :submit
|
|
- if @reports.total_count > @reports.size
|
|
.batch-table__select-all
|
|
.not-selected.active
|
|
%span= t('generic.all_items_on_page_selected_html', count: @reports.size)
|
|
%button{ type: 'button' }= t('generic.select_all_matching_items', count: @reports.total_count)
|
|
.selected
|
|
%span= t('generic.all_matching_items_selected_html', count: @reports.total_count)
|
|
%button{ type: 'button' }= t('generic.deselect')
|
|
.batch-table__body
|
|
- if @reports.empty?
|
|
= nothing_here 'nothing-here--under-tabs'
|
|
- else
|
|
= render partial: 'report', collection: @reports.group_by(&:target_account_id).values, locals: { f: f }
|
|
|
|
= paginate @reports
|