Improve: 全文検索が有効でない環境で、検索設定画面の表示を変更 (#479)

This commit is contained in:
KMY(雪あすか) 2024-01-18 09:29:58 +09:00 committed by GitHub
parent f20ebfac41
commit cb77851768
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 16 deletions

View file

@ -44,6 +44,9 @@
%h4= t 'preferences.searchability'
- unless Chewy.enabled?
%p.hint= t 'preferences.does_not_search'
.fields-row
.fields-group.fields-row__column.fields-row__column-12
= ff.input :default_searchability,
@ -59,24 +62,26 @@
.fields-group
= ff.input :disallow_unlisted_public_searchability, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_disallow_unlisted_public_searchability'), hint: I18n.t('simple_form.hints.defaults.setting_disallow_unlisted_public_searchability')
%h4= t 'preferences.search'
- if Chewy.enabled?
%h4= t 'preferences.search'
.fields-row
.fields-group.fields-row__column.fields-row__column-12
= ff.input :default_searchability_of_search,
collection: Status.selectable_searchabilities_for_search,
hint: false,
include_blank: false,
kmyblue: true,
label: I18n.t('simple_form.labels.defaults.setting_default_searchability_of_search'),
label_method: ->(searchability) { safe_join([I18n.t("statuses.searchabilities.#{searchability}"), I18n.t("statuses.searchabilities.#{searchability}_search_long")], ' - ') },
required: false,
wrapper: :with_label
.fields-group
= ff.input :reverse_search_quote, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_reverse_search_quote'), hint: I18n.t('simple_form.hints.defaults.setting_reverse_search_quote')
.fields-row
.fields-group.fields-row__column.fields-row__column-12
= ff.input :default_searchability_of_search,
collection: Status.selectable_searchabilities_for_search,
hint: false,
include_blank: false,
kmyblue: true,
label: I18n.t('simple_form.labels.defaults.setting_default_searchability_of_search'),
label_method: ->(searchability) { safe_join([I18n.t("statuses.searchabilities.#{searchability}"), I18n.t("statuses.searchabilities.#{searchability}_search_long")], ' - ') },
required: false,
wrapper: :with_label
.fields-group
= ff.input :use_public_index, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_use_public_index')
.fields-group
= ff.input :reverse_search_quote, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_reverse_search_quote'), hint: I18n.t('simple_form.hints.defaults.setting_reverse_search_quote')
.fields-group
= ff.input :use_public_index, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_use_public_index')
.actions
= f.button :button, t('generic.save_changes'), type: :submit