From f025cc67827a5b1b1faf10dec9d5a1e14e67fa5f Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 1 May 2017 11:42:13 -0400 Subject: Filter on allowed user language preferences (#2361) * Naive approached to timeline filtering * Convert allowed_languages into a db column * Allow users to choose languages to see statuses in * Style list items as two columns * Add a hint to explain language filtering preference --- app/views/settings/preferences/show.html.haml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/views/settings/preferences') diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index 8a4113ab4..10618ebf6 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -7,6 +7,16 @@ .fields-group = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) } + = f.input :allowed_languages, + collection: I18n.available_locales, + wrapper: :with_label, + include_blank: false, + label_method: lambda { |locale| human_locale(locale) }, + required: false, + as: :check_boxes, + collection_wrapper_tag: 'ul', + item_wrapper_tag: 'li' + = f.input :setting_default_privacy, collection: Status.visibilities.keys - ['direct'], wrapper: :with_label, include_blank: false, label_method: lambda { |visibility| safe_join([I18n.t("statuses.visibilities.#{visibility}"), content_tag(:span, I18n.t("statuses.visibilities.#{visibility}_long"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' .fields-group -- cgit