= turbo_frame_tag dom_id(report) do %div{class: "flex flex-col space-y-2 border rounded-md p-2 mt-2"} %div{class: "flex justify-between text-xs"} %span{class: "space-x-2"} - unless report.record.blank? = link_to report.record_path, data: { turbo: false }, target: "_blank" do %span{class: "bg-indigo-100 text-indigo-600 py-1 px-2 rounded-lg"}="#{report.record_type.upcase}##{report.record_id}" %span{class: "bg-yellow-100 text-yellow-600 rounded-md p-1"}=t("beetle_reporter.aasm_state.#{report.aasm_state}") %span{class: "flex space-x-2 items-center text-sm"} - if report.reason %span{class: "bg-red-100 text-red-600 p-1 rounded-lg"}= "处置原因:#{report.reason}" %span{class: "space-x-1"} - report.user_ids.each do |uid| = link_to main_app.send(BeetleReporter.config.main_app_user_path_method.to_sym, uid), data: {turbo: false} do %span{class: "bg-blue-100 rounded-lg px-1 py-0.5"}= "#{uid}" %span{class: "bg-red-600 text-white rounded-full w-5 h-5 flex justify-center items-center"}= "#{report.reported_count}" %span{class: "bg-gray-100 text-gray-600 py-1 px-2 rounded-lg"} = link_to report.created_at, report_path(report), data: {turbo: false} - unless current_user&.admin? = button_to '删除', report, method: :delete, data: { confirm: 'Are you sure?'}, class: "bg-red-600 text-white rounded-md px-2 py-0.5 cursor-pointer" %div{class: "flex justify-between items-center py-2 w-full"} %div{class: "flex flex-col rounded-lg bg-gray-50 p-3 text-sm space-y-4 w-full"} -unless report.record %h3{class: "text-2xl text-red-600"} 对应条目已被永久删除,当前审核请求已无效,请删除 - else %div %span{class: "#{report.record.is_private ? 'bg-black text-white' : 'border border-black text-black' } rounded-lg text-xs p-0.5 px-1"}=report.record.is_private ? "🙈 隐私" : "🙉 公开" %span{class: "border border-blue-600 text-blue-600 rounded-lg text-xs p-0.5"}=report.record.is_approved ? "审核通过" : "审核中..." - unless report.reasons.blank? - report.reasons.each do |reason| %span{class: "border border-red-600 text-red-600 rounded-lg text-xs p-0.5"}= reason - unless report&.record&.user_id&.blank? = link_to main_app.send(CensorBear.config.main_app_user_path_method.to_sym, report.record.user_id), data: {turbo: false} do %span{class: "text-sm bg-gray-100 text-gray-600 py-1 px-2 rounded-lg font-bold"}="✍️ ##{report.record.user_id}" - if report.record.discarded? %div{class: "text-gray-900 leading-relaxed"} %del= report.record.content - else %div{class: "text-gray-900 leading-relaxed"}= report.record.content %div - report.images.each do |img| = image_tag img[:src], class: "w-16 rounded-md" %div{class: "flex space-x-2 items-center justify-end"} - if report.may_ignore? = link_to "忽略", report_ignore_path(report), class: "text-yellow-600 cursor-pointer" - if report.may_hide? = link_to "隐藏内容", report_hide_path(report), class: "text-purple-600 cursor-pointer" - if report.may_remove? = link_to "删除内容", report_remove_path(report), class: "text-red-800 cursor-pointer" - if report.may_mute? = link_to "禁言用户", report_mute_path(report), class: "text-red-600 cursor-pointer" - if report.may_forbid? = link_to "封禁用户",report_forbid_path(report), class: "text-red-700 cursor-pointer" - if report.may_suspend? = link_to "暂缓处理", report_suspend_path(report), class: "text-indigo-600 cursor-pointer" - if report.may_undo? = link_to "撤销", report_undo_path(report), class: "text-red-600 cursor-pointer"