Sha256: b228891de7c6884e7a2aee9ef9f531a092fc3369635d17dc533bdd7c7bf06687

Contents?: true

Size: 1.85 KB

Versions: 15

Compression:

Stored size: 1.85 KB

Contents

= form_with(model: stop_word, class: "py-2") do |form|
  - if stop_word.errors.any?
    %h2= "#{pluralize(stop_word.errors.count, "error")} prohibited this stop_word from being saved:"
    %ul
      - stop_word.errors.each do |error|
        %li= error.full_message
  %div{class: "space-y-2"}
    %div
      %div{class: "text-gray-500 text-xs"}= form.label :key, "敏感词"
      %div= form.text_field :key, class: "border p-1 w-full rounded-md"
    %div
      %div{class: "text-gray-500 text-xs"}= form.label :ugc, "UGC内容处理方式"
      %div= form.select :ugc, options_for_select(CensorBear.action_options, stop_word.ugc), class: "border p-1 w-full rounded-md"
    %div
      %div{class: "text-gray-500 text-xs"}= form.label :username, "用户名处理方式"
      %div= form.select :username, options_for_select(CensorBear.action_options, stop_word.username), class: "border p-1 w-full rounded-md"
    %div
      %div{class: "text-gray-500 text-xs"}= form.label :nickname, "用户昵称处理方式"
      %div= form.select :nickname, options_for_select(CensorBear.action_options, stop_word.nickname), class: "border p-1 w-full rounded-md"
    %div
      %div{class: "text-gray-500 text-xs"}= form.label :signature, "签名处理方式"
      %div= form.select :signature, options_for_select(CensorBear.action_options, stop_word.signature), class: "border p-1 w-full rounded-md"
    %div
      %div{class: "text-gray-500 text-xs"}= form.label :dialog, "私信处理方式"
      %div= form.select :dialog, options_for_select(CensorBear.action_options, stop_word.dialog), class: "border p-1 w-full rounded-md"
    %div
      %div{class: "text-gray-500 text-xs"}= form.label :replacement, "过滤词替换"
      %div= form.text_field :replacement, class: "border p-1 w-full rounded-md"
    %div
      %div= form.submit "确认", class: "px-2 py-0.5 rounded-md bg-gray-800 text-white"

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
censor_bear-0.1.18 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.17 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.15 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.14 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.13 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.12 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.11 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.10 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.9 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.8 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.7 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.6 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.5 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.4 app/views/censor_bear/stop_words/_form.html.haml
censor_bear-0.1.3 app/views/censor_bear/stop_words/_form.html.haml