nas/app/views/settings/preferences/reaching/show.html.haml
KMY(雪あすか) f79fb3adae
Add: #483 特定の公開範囲を無効にするオプション (#712)
* Add: #483 特定の公開範囲を無効にするオプション

* Fix test partically

* Complete
2024-04-18 12:40:18 +09:00

98 lines
5.1 KiB
Text

- content_for :page_title do
= t('preferences.reaching')
- content_for :heading_actions do
= button_tag t('generic.save_changes'), class: 'button', form: 'edit_preferences'
= simple_form_for current_user, url: settings_preferences_reaching_path, html: { method: :put, id: 'edit_preferences' } do |f|
= render 'shared/error_messages', object: current_user
= f.simple_fields_for :settings, current_user.settings do |ff|
%h4= t 'preferences.visibility'
.fields-row
.fields-group.fields-row__column.fields-row__column-6
= ff.input :default_privacy,
collection: Status.selectable_visibilities,
hint: false,
include_blank: false,
label: I18n.t('simple_form.labels.defaults.setting_default_privacy'),
label_method: ->(visibility) { safe_join([I18n.t("statuses.visibilities.#{visibility}"), I18n.t("statuses.visibilities.#{visibility}_long")], ' - ') },
required: false,
wrapper: :with_label
.fields-group.fields-row__column.fields-row__column-6
= ff.input :default_reblog_privacy,
collection: Status.selectable_reblog_visibilities,
hint: false,
include_blank: false,
kmyblue: true,
label: I18n.t('simple_form.labels.defaults.setting_default_reblog_privacy'),
label_method: ->(visibility) { safe_join([I18n.t("statuses.visibilities.#{visibility}"), I18n.t("statuses.visibilities.#{visibility}_long")], ' - ') },
required: false,
wrapper: :with_label
.fields-group
= ff.input :stay_privacy, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_stay_privacy')
- if Setting.enable_public_unlisted_visibility
.fields-group
= ff.input :public_post_to_unlisted, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_public_post_to_unlisted'), hint: I18n.t('simple_form.hints.defaults.setting_public_post_to_unlisted')
.fields-group
= ff.input :enabled_visibilities,
as: :check_boxes,
collection_wrapper_tag: 'ul',
collection: Status.selectable_all_visibilities,
hint: I18n.t('simple_form.hints.defaults.setting_enabled_visibilities'),
include_blank: false,
item_wrapper_tag: 'li',
kmyblue: true,
label: I18n.t('simple_form.labels.defaults.setting_enabled_visibilities'),
label_method: ->(visibility) { I18n.t("statuses.visibilities.#{visibility}") },
required: false,
wrapper: :with_block_label
%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,
collection: Status.selectable_searchabilities,
hint: I18n.t('simple_form.hints.defaults.setting_default_searchability'),
include_blank: false,
kmyblue: true,
label: I18n.t('simple_form.labels.defaults.setting_default_searchability'),
label_method: ->(searchability) { safe_join([I18n.t("statuses.searchabilities.#{searchability}"), I18n.t("statuses.searchabilities.#{searchability}_long")], ' - ') },
required: false,
wrapper: :with_label
.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')
- 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-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