# target_account_id :bigint(8) not null
# assigned_account_id :bigint(8)
# uri :string
+# forwarded :boolean
#
class Report < ApplicationRecord
target_account: @target_account,
status_ids: @status_ids,
comment: @comment,
- uri: @options[:uri]
+ uri: @options[:uri],
+ forwarded: ActiveModel::Type::Boolean.new.cast(@options[:forward])
)
end
= fa_icon('camera')
= report.media_attachments.count
+ - if report.forwarded?
+ ยท
+ = t('admin.reports.forwarded_to', domain: target_account.domain)
+
.report-card__summary__item__assigned
- if report.assigned_account.present?
= admin_account_link_to report.assigned_account
%td{ colspan: 2 }
- if @report.action_taken?
= table_link_to 'envelope-open', t('admin.reports.reopen'), admin_report_path(@report, outcome: 'reopen'), method: :put
+ - unless @report.target_account.local?
+ %tr
+ %th= t('admin.reports.forwarded')
+ %td{ colspan: 3 }
+ - if @report.forwarded.nil?
+ \-
+ - elsif @report.forwarded?
+ = t('simple_form.yes')
+ - else
+ = t('simple_form.no')
- if !@report.action_taken_by_account.nil?
%tr
%th= t('admin.reports.action_taken_by')
comment:
none: None
created_at: Reported
+ forwarded: Forwarded
+ forwarded_to: Forwarded to %{domain}
mark_as_resolved: Mark as resolved
mark_as_unresolved: Mark as unresolved
notes:
--- /dev/null
+class AddForwardedToReports < ActiveRecord::Migration[5.2]
+ def change
+ add_column :reports, :forwarded, :boolean
+ end
+end
t.bigint "target_account_id", null: false
t.bigint "assigned_account_id"
t.string "uri"
+ t.boolean "forwarded"
t.index ["account_id"], name: "index_reports_on_account_id"
t.index ["target_account_id"], name: "index_reports_on_target_account_id"
end