= turbo_frame_tag dom_id(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: ""} - unless log.scenario.blank? %span{class: "text-sm bg-blue-100 text-blue-600 py-1 px-2 rounded-lg"}= log.scenario.upcase - unless log.stage.blank? %span{class: "text-sm bg-pink-100 text-pink-600 py-1 px-2 rounded-lg"}=t("censor_log.stage.#{log.stage}") - unless log.action.blank? %span{class: "text-sm bg-yellow-100 text-yellow-600 py-1 px-2 rounded-lg"}=t("censor_log.action.#{log.action.downcase}") - unless log.user_id.blank? %span{class: "text-sm bg-gray-100 text-gray-600 py-1 px-2 rounded-lg font-bold"}="##{log.user_id}" - unless log.ip.blank? %span{class: "text-sm bg-gray-100 text-gray-600 py-1 px-2 rounded-lg"}=log.ip - unless log.labels.blank? - log.labels.each do |label| %span{class: "text-sm bg-red-100 text-red-600 py-1 px-2 rounded-lg"}=t("censor_log.label.#{label}") %span{class: "text-sm bg-gray-100 text-gray-600 py-1 px-2 rounded-lg"}= log.created_at %div{class: "flex space-x-2 items-center"} %span = link_to '详情', log %span = button_to '删除', log, method: :delete, data: { confirm: 'Are you sure?' }, class: "text-red-600 rounded-md px-2 py-0.5" %div{class: "flex justify-between items-center"} %div{class: "flex flex-col"} %div{class: ""} %div= log.original_content - if log.filtered_content %div{class: "border-t"} %div= log.filtered_content %div{class: "text-yellow-500 font-meidum text-xl"} - log.mod_words.each do |word| %span [ %span= link_to word, stop_words_path(q: word), data: { turbo: false } %span ]