From b19d4eb43d3b717647e3ffa248c853070c5ad2e1 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 24 Oct 2023 20:53:58 +0200 Subject: [PATCH] Fix HAML linting issues --- app/views/admin/settings/appearance/show.html.haml | 2 +- app/views/layouts/_theme.html.haml | 3 +-- app/views/settings/preferences/other/show.html.haml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/admin/settings/appearance/show.html.haml b/app/views/admin/settings/appearance/show.html.haml index 60522240f5..89eddfdc42 100644 --- a/app/views/admin/settings/appearance/show.html.haml +++ b/app/views/admin/settings/appearance/show.html.haml @@ -11,7 +11,7 @@ %p.lead= t('admin.settings.appearance.preamble') .fields-group - = f.input :flavour_and_skin, collection: Themes.instance.flavours_and_skins, group_label_method: -> (flavour_and_skin) { I18n.t("flavours.#{flavour_and_skin}.name", default: flavour_and_skin) }, wrapper: :with_label, label: t('admin.settings.flavour_and_skin.title'), include_blank: false, as: :grouped_select, label_method: :last, value_method: lambda { |value| value.join('/') }, group_method: :last + = f.input :flavour_and_skin, collection: Themes.instance.flavours_and_skins, group_label_method: ->(flavour_and_skin) { I18n.t("flavours.#{flavour_and_skin}.name", default: flavour_and_skin) }, wrapper: :with_label, label: t('admin.settings.flavour_and_skin.title'), include_blank: false, as: :grouped_select, label_method: :last, value_method: ->(value) { value.join('/') }, group_method: :last .fields-group = f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 } diff --git a/app/views/layouts/_theme.html.haml b/app/views/layouts/_theme.html.haml index 71e661de65..2b40d408f2 100644 --- a/app/views/layouts/_theme.html.haml +++ b/app/views/layouts/_theme.html.haml @@ -1,6 +1,5 @@ - if theme - - if theme[:pack] != 'common' && theme[:common] - = render partial: 'layouts/theme', object: theme[:common] + = render partial: 'layouts/theme', object: theme[:common] if theme[:pack] != 'common' && theme[:common] - if theme[:pack] - pack_path = theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}" = javascript_pack_tag pack_path, crossorigin: 'anonymous' diff --git a/app/views/settings/preferences/other/show.html.haml b/app/views/settings/preferences/other/show.html.haml index afe8529e00..fe1cdbf48f 100644 --- a/app/views/settings/preferences/other/show.html.haml +++ b/app/views/settings/preferences/other/show.html.haml @@ -24,7 +24,7 @@ = ff.input :default_sensitive, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_sensitive'), hint: I18n.t('simple_form.hints.defaults.setting_default_sensitive') .fields-group - = ff.input :default_content_type, collection: ['text/plain', 'text/markdown', 'text/html'], wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_content_type'), include_blank: false, label_method: lambda { |item| safe_join([t("simple_form.labels.defaults.setting_default_content_type_#{item.split('/')[1]}"), content_tag(:span, t("simple_form.hints.defaults.setting_default_content_type_#{item.split('/')[1]}"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', glitch_only: true + = ff.input :default_content_type, collection: ['text/plain', 'text/markdown', 'text/html'], wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_content_type'), include_blank: false, label_method: ->(item) { safe_join([t("simple_form.labels.defaults.setting_default_content_type_#{item.split('/')[1]}"), content_tag(:span, t("simple_form.hints.defaults.setting_default_content_type_#{item.split('/')[1]}"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', glitch_only: true %h4= t 'preferences.public_timelines'