2019-12-16 22:55:50 +00:00
|
|
|
- content_for :header_tags do
|
2020-11-06 10:56:31 +00:00
|
|
|
= javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous'
|
2019-12-16 22:55:50 +00:00
|
|
|
|
2017-05-04 16:12:44 +00:00
|
|
|
- content_for :page_title do
|
|
|
|
= t('admin.settings.title')
|
|
|
|
|
2020-03-08 15:04:03 +00:00
|
|
|
- content_for :heading_actions do
|
|
|
|
= button_tag t('generic.save_changes'), class: 'button', form: 'edit_admin'
|
|
|
|
|
|
|
|
= simple_form_for @admin_settings, url: admin_settings_path, html: { method: :patch, id: 'edit_admin' } do |f|
|
2019-03-23 13:07:04 +00:00
|
|
|
= render 'shared/error_messages', object: @admin_settings
|
2018-07-06 00:15:56 +00:00
|
|
|
|
2017-07-12 01:24:04 +00:00
|
|
|
.fields-group
|
2018-09-18 14:45:58 +00:00
|
|
|
= f.input :site_title, wrapper: :with_label, label: t('admin.settings.site_title')
|
|
|
|
|
2019-03-14 04:28:30 +00:00
|
|
|
.fields-row
|
|
|
|
.fields-row__column.fields-row__column-6.fields-group
|
2019-06-19 15:30:08 +00:00
|
|
|
= f.input :theme, collection: Themes.instance.names, label: t('simple_form.labels.defaults.setting_theme'), label_method: lambda { |theme| I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false
|
2019-03-14 04:28:30 +00:00
|
|
|
.fields-row__column.fields-row__column-6.fields-group
|
|
|
|
= f.input :registrations_mode, collection: %w(open approved none), wrapper: :with_label, label: t('admin.settings.registrations_mode.title'), include_blank: false, label_method: lambda { |mode| I18n.t("admin.settings.registrations_mode.modes.#{mode}") }
|
2018-09-18 14:45:58 +00:00
|
|
|
|
|
|
|
.fields-row
|
|
|
|
.fields-row__column.fields-row__column-6.fields-group
|
|
|
|
= f.input :site_contact_username, wrapper: :with_label, label: t('admin.settings.contact_information.username')
|
|
|
|
.fields-row__column.fields-row__column-6.fields-group
|
|
|
|
= f.input :site_contact_email, wrapper: :with_label, label: t('admin.settings.contact_information.email')
|
|
|
|
|
|
|
|
.fields-group
|
2019-10-08 22:30:15 +00:00
|
|
|
= f.input :site_short_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_short_description.title'), hint: t('admin.settings.site_short_description.desc_html'), input_html: { rows: 2 }
|
2017-05-04 16:12:44 +00:00
|
|
|
|
2018-09-18 14:45:58 +00:00
|
|
|
.fields-group
|
2019-10-08 22:30:15 +00:00
|
|
|
= f.input :site_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description.title'), hint: t('admin.settings.site_description.desc_html'), input_html: { rows: 2 }
|
2018-09-18 14:45:58 +00:00
|
|
|
|
|
|
|
.fields-row
|
|
|
|
.fields-row__column.fields-row__column-6.fields-group
|
2020-03-08 15:00:24 +00:00
|
|
|
= f.input :thumbnail, as: :file, wrapper: :with_block_label, label: t('admin.settings.thumbnail.title'), hint: site_upload_delete_hint(t('admin.settings.thumbnail.desc_html'), :thumbnail)
|
2018-09-18 14:45:58 +00:00
|
|
|
.fields-row__column.fields-row__column-6.fields-group
|
2020-03-08 15:00:24 +00:00
|
|
|
= f.input :hero, as: :file, wrapper: :with_block_label, label: t('admin.settings.hero.title'), hint: site_upload_delete_hint(t('admin.settings.hero.desc_html'), :hero)
|
2018-10-12 02:04:08 +00:00
|
|
|
|
|
|
|
.fields-row
|
2018-10-07 22:20:45 +00:00
|
|
|
.fields-row__column.fields-row__column-6.fields-group
|
2020-03-08 15:00:24 +00:00
|
|
|
= f.input :mascot, as: :file, wrapper: :with_block_label, label: t('admin.settings.mascot.title'), hint: site_upload_delete_hint(t('admin.settings.mascot.desc_html'), :mascot)
|
2018-09-18 14:45:58 +00:00
|
|
|
|
|
|
|
%hr.spacer/
|
2017-07-12 01:24:04 +00:00
|
|
|
|
2020-12-14 09:03:09 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :require_invite_text, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.require_invite_text.title'), hint: t('admin.settings.registrations.require_invite_text.desc_html'), disabled: !approved_registrations?
|
|
|
|
.fields-group
|
|
|
|
|
|
|
|
%hr.spacer/
|
|
|
|
|
2017-09-13 22:04:30 +00:00
|
|
|
.fields-group
|
2021-04-24 15:01:43 +00:00
|
|
|
= f.input :bootstrap_timeline_accounts, wrapper: :with_block_label, label: t('admin.settings.bootstrap_timeline_accounts.title'), hint: t('admin.settings.bootstrap_timeline_accounts.desc_html')
|
2017-09-13 22:04:30 +00:00
|
|
|
|
2018-09-18 14:45:58 +00:00
|
|
|
%hr.spacer/
|
2017-09-13 22:04:30 +00:00
|
|
|
|
2019-07-30 09:10:46 +00:00
|
|
|
- unless whitelist_mode?
|
|
|
|
.fields-group
|
|
|
|
= f.input :timeline_preview, as: :boolean, wrapper: :with_label, label: t('admin.settings.timeline_preview.title'), hint: t('admin.settings.timeline_preview.desc_html')
|
2017-07-12 01:24:04 +00:00
|
|
|
|
2019-07-30 09:10:46 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :show_known_fediverse_at_about_page, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_known_fediverse_at_about_page.title'), hint: t('admin.settings.show_known_fediverse_at_about_page.desc_html')
|
2018-02-04 05:00:10 +00:00
|
|
|
|
2017-11-19 03:13:57 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :show_staff_badge, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_staff_badge.title'), hint: t('admin.settings.show_staff_badge.desc_html')
|
|
|
|
|
2022-06-28 05:17:13 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :show_moderator_badge, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_moderator_badge.title'), hint: t('admin.settings.show_moderator_badge.desc_html'), fedibird_features: true
|
|
|
|
|
2017-07-12 01:24:04 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :open_deletion, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.deletion.title'), hint: t('admin.settings.registrations.deletion.desc_html')
|
|
|
|
|
2019-07-30 09:10:46 +00:00
|
|
|
- unless whitelist_mode?
|
|
|
|
.fields-group
|
2021-04-20 11:57:45 +00:00
|
|
|
= f.input :activity_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.activity_api_enabled.title'), hint: t('admin.settings.activity_api_enabled.desc_html'), recommended: true
|
2017-11-27 15:07:59 +00:00
|
|
|
|
2019-07-30 09:10:46 +00:00
|
|
|
.fields-group
|
2021-04-20 11:57:45 +00:00
|
|
|
= f.input :peers_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.peers_api_enabled.title'), hint: t('admin.settings.peers_api_enabled.desc_html'), recommended: true
|
2017-09-10 07:58:38 +00:00
|
|
|
|
2019-07-30 09:10:46 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :preview_sensitive_media, as: :boolean, wrapper: :with_label, label: t('admin.settings.preview_sensitive_media.title'), hint: t('admin.settings.preview_sensitive_media.desc_html')
|
2017-09-10 07:58:38 +00:00
|
|
|
|
2019-07-30 09:10:46 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :profile_directory, as: :boolean, wrapper: :with_label, label: t('admin.settings.profile_directory.title'), hint: t('admin.settings.profile_directory.desc_html')
|
2018-12-11 18:18:29 +00:00
|
|
|
|
2019-08-06 15:57:52 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :trends, as: :boolean, wrapper: :with_label, label: t('admin.settings.trends.title'), hint: t('admin.settings.trends.desc_html')
|
|
|
|
|
2019-10-08 22:30:15 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :trendable_by_default, as: :boolean, wrapper: :with_label, label: t('admin.settings.trendable_by_default.title'), hint: t('admin.settings.trendable_by_default.desc_html')
|
|
|
|
|
2019-09-11 06:44:58 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html')
|
|
|
|
|
2023-02-16 04:19:58 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :allow_poll_image, as: :boolean, wrapper: :with_label, label: t('admin.settings.allow_poll_image.title'), hint: t('admin.settings.allow_poll_image.desc_html'), fedibird_features: true
|
|
|
|
|
2023-02-16 07:22:15 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :poll_max_options, wrapper: :with_label, label: t('admin.settings.poll_max_options.title'), hint: t('admin.settings.poll_max_options.desc_html', count: PollValidator::MAX_OPTIONS_LIMIT), fedibird_features: true
|
|
|
|
|
2023-03-05 17:09:25 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :reaction_max_per_account, wrapper: :with_label, label: t('admin.settings.reaction_max_per_account.title'), hint: t('admin.settings.reaction_max_per_account.desc_html', count: EmojiReactionValidator::MAX_PER_ACCOUNT_LIMIT), fedibird_features: true
|
|
|
|
|
2018-09-18 14:45:58 +00:00
|
|
|
%hr.spacer/
|
2017-12-29 18:52:04 +00:00
|
|
|
|
|
|
|
.fields-group
|
2018-09-18 14:45:58 +00:00
|
|
|
= f.input :min_invite_role, wrapper: :with_label, collection: %i(disabled user moderator admin), label: t('admin.settings.registrations.min_invite_role.title'), label_method: lambda { |role| role == :disabled ? t('admin.settings.registrations.min_invite_role.disabled') : t("admin.accounts.roles.#{role}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
2019-08-19 09:35:48 +00:00
|
|
|
|
|
|
|
.fields-row
|
|
|
|
.fields-row__column.fields-row__column-6.fields-group
|
|
|
|
= f.input :show_domain_blocks, wrapper: :with_label, collection: %i(disabled users all), label: t('admin.settings.domain_blocks.title'), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
|
|
|
.fields-row__column.fields-row__column-6.fields-group
|
|
|
|
= f.input :show_domain_blocks_rationale, wrapper: :with_label, collection: %i(disabled users all), label: t('admin.settings.domain_blocks_rationale.title'), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
2017-12-29 18:52:04 +00:00
|
|
|
|
|
|
|
.fields-group
|
2019-07-30 09:10:46 +00:00
|
|
|
= f.input :site_extended_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description_extended.title'), hint: t('admin.settings.site_description_extended.desc_html'), input_html: { rows: 8 } unless whitelist_mode?
|
2019-10-08 22:30:15 +00:00
|
|
|
= f.input :closed_registrations_message, as: :text, wrapper: :with_block_label, label: t('admin.settings.registrations.closed_message.title'), hint: t('admin.settings.registrations.closed_message.desc_html'), input_html: { rows: 8 }
|
2018-09-18 14:45:58 +00:00
|
|
|
= f.input :site_terms, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_terms.title'), hint: t('admin.settings.site_terms.desc_html'), input_html: { rows: 8 }
|
|
|
|
= f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }, label: t('admin.settings.custom_css.title'), hint: t('admin.settings.custom_css.desc_html')
|
2018-07-06 00:15:56 +00:00
|
|
|
|
2017-07-12 01:24:04 +00:00
|
|
|
.actions
|
|
|
|
= f.button :button, t('generic.save_changes'), type: :submit
|