{{define "admin/reports.html"}} {{template "admin_shell_open" .}}
{{template "admin_flash" .}} {{template "admin_pagehead" (dict "Icon" "bx-flag" "Title" (T "admin.reports.title") "Desc" (T "admin.reports.desc"))}}
{{range .Data.Rows}} {{$rid := index . "id"}}{{$tt := asInt (index . "target_type")}} {{else}}{{end}}
ID{{T "admin.reports.col_status"}}reporter{{T "admin.reports.col_target"}}{{T "admin.reports.col_reason"}}{{T "admin.reports.col_ops"}}
{{$rid}} {{$rs := asInt (index . "status")}}{{if eq $rs 1}}{{T "admin.reports.pending"}}{{else if eq $rs 2}}{{T "admin.reports.processing"}}{{else if eq $rs 3}}{{T "admin.reports.done"}}{{else}}{{$rs}}{{end}} #{{index . "reporter_id"}} {{index . "reporter_name"}} {{if eq $tt 2}}{{T "admin.reports.type_comment"}}{{else}}{{T "admin.reports.type_item"}}{{end}}
item #{{index . "item_id"}} {{index . "item_title"}}
comment #{{index . "comment_id"}}
{{$rk := printf "%s" (index . "reason")}}{{if eq $rk "infringement"}}{{T "item_report_op_infringement"}}{{else if eq $rk "spam"}}{{T "item_report_op_spam"}}{{else if eq $rk "fraud"}}{{T "item_report_op_fraud"}}{{else if eq $rk "other"}}{{T "item_report_op_other"}}{{else}}{{$rk}}{{end}}
{{T "admin.reports.empty"}}
{{$pg := .Data.Page}}{{$ps := .Data.PageSize}}{{if or (gt $pg 1) (eq (len .Data.Rows) $ps)}} {{end}}
{{template "admin_shell_close" .}} {{end}}