From af0b6f445c597b41e861da9e77f39b4caed3e753 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sun, 16 Aug 2020 21:48:42 -0500 Subject: [Filters, Timelines] Add options to toggle filters for replies to and boosts of unfollowed accounts --- .../settings/preferences/filters/show.html.haml | 22 ++++++++++++++++++++++ .../settings/preferences/other/show.html.haml | 5 ----- 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 app/views/settings/preferences/filters/show.html.haml (limited to 'app/views/settings') diff --git a/app/views/settings/preferences/filters/show.html.haml b/app/views/settings/preferences/filters/show.html.haml new file mode 100644 index 000000000..f91010724 --- /dev/null +++ b/app/views/settings/preferences/filters/show.html.haml @@ -0,0 +1,22 @@ +- content_for :page_title do + = t('settings.preferences') + +- content_for :heading_actions do + = button_tag t('generic.save_changes'), class: 'button', form: 'edit_preferences' + += simple_form_for current_user, url: settings_preferences_filters_path, html: { method: :put, id: 'edit_preferences' } do |f| + = render 'shared/error_messages', object: current_user + + %h4= t 'preferences.filtering' + + .fields-group + = f.input :setting_filter_to_unknown, as: :boolean, wrapper: :with_label + = f.input :setting_filter_from_unknown, as: :boolean, wrapper: :with_label + + %h4= t 'preferences.public_timelines' + + .fields-group + = f.input :chosen_languages, collection: filterable_languages.sort, wrapper: :with_block_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' + + .actions + = f.button :button, t('generic.save_changes'), type: :submit diff --git a/app/views/settings/preferences/other/show.html.haml b/app/views/settings/preferences/other/show.html.haml index efe8cd0db..87a03a515 100644 --- a/app/views/settings/preferences/other/show.html.haml +++ b/app/views/settings/preferences/other/show.html.haml @@ -41,10 +41,5 @@ .fields-group = f.input :setting_default_content_type, collection: ['text/plain', 'text/markdown', 'text/html'], wrapper: :with_label, 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' - %h4= t 'preferences.public_timelines' - - .fields-group - = f.input :chosen_languages, collection: filterable_languages.sort, wrapper: :with_block_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' - .actions = f.button :button, t('generic.save_changes'), type: :submit -- cgit