= turbo_frame_tag dom_id(mod_log) do %div{class: "flex flex-col"} %div{class: "border rounded-md mb-2 p-2 flex flex-col space-y-1"} %div{class: "flex justify-between"} %div{class: "text-sm"} = link_to mod_log.record_path, data: { turbo: false }, target: "_blank" do %span{class: "bg-indigo-100 text-indigo-600 py-1 px-2 rounded-lg"}="#{mod_log.record_type.upcase}##{mod_log.record_id}" %span{class: "bg-yellow-100 text-yellow-600 rounded-md p-1"}=t("censor_log.aasm_state.#{mod_log.aasm_state}") %div{class: "flex space-x-2 items-center text-sm"} - if mod_log.reason %span{class: "bg-red-100 text-red-600 p-1 rounded-lg"} = mod_log.reason %span{class: "bg-gray-100 text-gray-600 py-1 px-2 rounded-lg"}= mod_log.created_at - if current_user.admin? = button_to '删除', mod_log, 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 mod_log.record %h3{class: "text-2xl text-red-600"} 对应条目已被永久删除,当前审核请求已无效,请删除 - else %div %span{class: "border border-pink-600 text-pink-600 rounded-lg text-xs p-0.5"}=mod_log.record.is_private ? "隐私" : "公开" %span{class: "border border-blue-600 text-blue-600 rounded-lg text-xs p-0.5"}=mod_log.record.is_approved ? "审核通过" : "审核中..." - if mod_log.record.discarded? %div{class: "text-gray-900 leading-relaxed"} %del= mod_log.record.content - else %div{class: "text-gray-900 leading-relaxed"}= mod_log.record.content %div - mod_log.record.pictures.each do |pic| = image_tag pic.full_url, class: "w-16 rounded-md" %div - unless mod_log.labels.blank? - mod_log.labels.each do |label| %span{class: "text-xs bg-gray-200 text-gray-600 py-0.5 px-1 rounded-lg"}=t("censor_log.label.#{label}") - unless mod_log.mod_words.blank? - mod_log.mod_words.each do |word| %span{class: "text-sm bg-gray-100 text-gray-600 py-0.5 px-1 rounded-lg"}="##{word}" %div{class: "flex space-x-2 items-center justify-end"} - if mod_log.may_suspend? = link_to "忽略", mod_log_suspend_path(mod_log), class: "text-yellow-600 cursor-pointer" - if mod_log.may_pass? = link_to "通过", mod_log_pass_path(mod_log), class: "text-green-600 cursor-pointer" - if mod_log.may_undo? = link_to "撤销", mod_log_undo_path(mod_log), class: "text-red-600 cursor-pointer" - if mod_log.may_reject? = form_with(url: mod_log_reject_path(mod_log), method: :get, class: "space-x-1 flex items-center") do |f| = f.submit "拒绝", class: "text-red-600 bg-transparent cursor-pointer" = f.text_field :reason, value: mod_log.reason, placeholder: "不通过原因", class: "border rounded-md m py-0.5 px-1 text-sm"