Fix haml-lint LineLength
cops in app/views/admin (#28680)
This commit is contained in:
parent
7720c684c5
commit
f445d33fd6
37 changed files with 576 additions and 146 deletions
|
@ -11,7 +11,10 @@
|
|||
%p.lead= t('admin.settings.about.preamble')
|
||||
|
||||
.fields-group
|
||||
= f.input :site_extended_description, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }
|
||||
= f.input :site_extended_description,
|
||||
as: :text,
|
||||
input_html: { rows: 8 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
%p.hint
|
||||
= t 'admin.settings.about.rules_hint'
|
||||
|
@ -19,15 +22,32 @@
|
|||
|
||||
.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_method: ->(value) { t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
= f.input :show_domain_blocks,
|
||||
collection_wrapper_tag: 'ul',
|
||||
collection: %i(disabled users all),
|
||||
include_blank: false,
|
||||
item_wrapper_tag: 'li',
|
||||
label_method: ->(value) { t("admin.settings.domain_blocks.#{value}") },
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :show_domain_blocks_rationale, wrapper: :with_label, collection: %i(disabled users all), label_method: ->(value) { t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
= f.input :show_domain_blocks_rationale,
|
||||
collection_wrapper_tag: 'ul',
|
||||
collection: %i(disabled users all),
|
||||
include_blank: false,
|
||||
item_wrapper_tag: 'li',
|
||||
label_method: ->(value) { t("admin.settings.domain_blocks.#{value}") },
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :status_page_url, wrapper: :with_block_label, input_html: { placeholder: "https://status.#{Rails.configuration.x.local_domain}" }
|
||||
= f.input :status_page_url,
|
||||
input_html: { placeholder: "https://status.#{Rails.configuration.x.local_domain}" },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :site_terms, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }
|
||||
= f.input :site_terms,
|
||||
as: :text,
|
||||
input_html: { rows: 8 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -11,14 +11,23 @@
|
|||
%p.lead= t('admin.settings.appearance.preamble')
|
||||
|
||||
.fields-group
|
||||
= f.input :theme, collection: Themes.instance.names, label_method: ->(theme) { I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false
|
||||
= f.input :theme,
|
||||
collection: Themes.instance.names,
|
||||
include_blank: false,
|
||||
label_method: ->(theme) { I18n.t("themes.#{theme}", default: theme) },
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }
|
||||
= f.input :custom_css,
|
||||
as: :text,
|
||||
input_html: { rows: 8 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :mascot, as: :file, wrapper: :with_block_label
|
||||
= f.input :mascot,
|
||||
as: :file,
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
- if @admin_settings.mascot.persisted?
|
||||
|
|
|
@ -11,20 +11,28 @@
|
|||
%p.lead= t('admin.settings.branding.preamble')
|
||||
|
||||
.fields-group
|
||||
= f.input :site_title, wrapper: :with_label
|
||||
= f.input :site_title,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :site_contact_username, wrapper: :with_label
|
||||
= f.input :site_contact_username,
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :site_contact_email, wrapper: :with_label
|
||||
= f.input :site_contact_email,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :site_short_description, wrapper: :with_block_label, as: :text, input_html: { rows: 2, maxlength: 200 }
|
||||
= f.input :site_short_description,
|
||||
as: :text,
|
||||
input_html: { rows: 2, maxlength: 200 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :thumbnail, as: :file, wrapper: :with_block_label
|
||||
= f.input :thumbnail,
|
||||
as: :file,
|
||||
wrapper: :with_block_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
- if @admin_settings.thumbnail.persisted?
|
||||
= image_tag @admin_settings.thumbnail.file.url(:'@1x'), class: 'fields-group__thumbnail'
|
||||
|
|
|
@ -11,9 +11,17 @@
|
|||
%p.lead= t('admin.settings.content_retention.preamble')
|
||||
|
||||
.fields-group
|
||||
= f.input :media_cache_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }
|
||||
= f.input :content_cache_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }, hint: false, warning_hint: t('simple_form.hints.form_admin_settings.content_cache_retention_period')
|
||||
= f.input :backups_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }
|
||||
= f.input :media_cache_retention_period,
|
||||
input_html: { pattern: '[0-9]+' },
|
||||
wrapper: :with_block_label
|
||||
= f.input :content_cache_retention_period,
|
||||
hint: false,
|
||||
input_html: { pattern: '[0-9]+' },
|
||||
warning_hint: t('simple_form.hints.form_admin_settings.content_cache_retention_period'),
|
||||
wrapper: :with_block_label
|
||||
= f.input :backups_retention_period,
|
||||
input_html: { pattern: '[0-9]+' },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -13,46 +13,75 @@
|
|||
%h4= t('admin.settings.discovery.trends')
|
||||
|
||||
.fields-group
|
||||
= f.input :trends, as: :boolean, wrapper: :with_label
|
||||
= f.input :trends,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :trends_as_landing_page, as: :boolean, wrapper: :with_label
|
||||
= f.input :trends_as_landing_page,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :trendable_by_default, as: :boolean, wrapper: :with_label, recommended: :not_recommended
|
||||
= f.input :trendable_by_default,
|
||||
as: :boolean,
|
||||
wrapper: :with_label,
|
||||
recommended: :not_recommended
|
||||
|
||||
%h4= t('admin.settings.discovery.public_timelines')
|
||||
|
||||
.fields-group
|
||||
= f.input :timeline_preview, as: :boolean, wrapper: :with_label
|
||||
= f.input :timeline_preview,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.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')
|
||||
= f.input :noindex,
|
||||
as: :boolean,
|
||||
hint: t('admin.settings.default_noindex.desc_html'),
|
||||
label: t('admin.settings.default_noindex.title'),
|
||||
wrapper: :with_label
|
||||
|
||||
%h4= t('admin.settings.discovery.publish_statistics')
|
||||
|
||||
.fields-group
|
||||
= f.input :activity_api_enabled, as: :boolean, wrapper: :with_label, recommended: :recommended
|
||||
= f.input :activity_api_enabled,
|
||||
as: :boolean,
|
||||
wrapper: :with_label,
|
||||
recommended: :recommended
|
||||
|
||||
%h4= t('admin.settings.discovery.publish_discovered_servers')
|
||||
|
||||
.fields-group
|
||||
= f.input :peers_api_enabled, as: :boolean, wrapper: :with_label, recommended: :recommended
|
||||
= f.input :peers_api_enabled,
|
||||
as: :boolean,
|
||||
wrapper: :with_label,
|
||||
recommended: :recommended
|
||||
|
||||
%h4= t('admin.settings.security.federation_authentication')
|
||||
|
||||
.fields-group
|
||||
= f.input :authorized_fetch, as: :boolean, wrapper: :with_label, label: t('admin.settings.security.authorized_fetch'), warning_hint: discovery_warning_hint_text, hint: discovery_hint_text, disabled: authorized_fetch_overridden?, recommended: discovery_recommended_value
|
||||
= f.input :authorized_fetch,
|
||||
as: :boolean,
|
||||
disabled: authorized_fetch_overridden?,
|
||||
hint: discovery_hint_text,
|
||||
label: t('admin.settings.security.authorized_fetch'),
|
||||
recommended: discovery_recommended_value,
|
||||
warning_hint: discovery_warning_hint_text,
|
||||
wrapper: :with_label
|
||||
|
||||
%h4= t('admin.settings.discovery.follow_recommendations')
|
||||
|
||||
.fields-group
|
||||
= f.input :bootstrap_timeline_accounts, wrapper: :with_block_label
|
||||
= f.input :bootstrap_timeline_accounts,
|
||||
wrapper: :with_block_label
|
||||
|
||||
%h4= t('admin.settings.discovery.profile_directory')
|
||||
|
||||
.fields-group
|
||||
= f.input :profile_directory, as: :boolean, wrapper: :with_label
|
||||
= f.input :profile_directory,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -14,17 +14,32 @@
|
|||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :registrations_mode, collection: %w(open approved none), wrapper: :with_label, include_blank: false, label_method: ->(mode) { I18n.t("admin.settings.registrations_mode.modes.#{mode}") }, warning_hint: I18n.t('admin.settings.registrations_mode.warning_hint')
|
||||
= f.input :registrations_mode,
|
||||
collection: %w(open approved none),
|
||||
include_blank: false,
|
||||
label_method: ->(mode) { I18n.t("admin.settings.registrations_mode.modes.#{mode}") },
|
||||
warning_hint: I18n.t('admin.settings.registrations_mode.warning_hint'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :require_invite_text, as: :boolean, wrapper: :with_label, disabled: !approved_registrations?
|
||||
= f.input :require_invite_text,
|
||||
as: :boolean,
|
||||
disabled: !approved_registrations?,
|
||||
wrapper: :with_label
|
||||
|
||||
- if captcha_available?
|
||||
.fields-group
|
||||
= f.input :captcha_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.captcha_enabled.title'), hint: t('admin.settings.captcha_enabled.desc_html')
|
||||
= f.input :captcha_enabled,
|
||||
as: :boolean,
|
||||
hint: t('admin.settings.captcha_enabled.desc_html'),
|
||||
label: t('admin.settings.captcha_enabled.title'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :closed_registrations_message, as: :text, wrapper: :with_block_label, input_html: { rows: 2 }
|
||||
= f.input :closed_registrations_message,
|
||||
as: :text,
|
||||
input_html: { rows: 2 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue