From b11fdc3ae3f90731c01149a5a36dc64e065d4ea2 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 12 Jan 2017 20:46:24 +0100 Subject: Migrate from ledermann/rails-settings to rails-settings-cached which allows global settings with YAML-defined defaults. Add admin page for editing global settings. Add "site_description" setting that would show as a paragraph on the frontpage --- app/views/settings/preferences/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/settings') diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index a0860c94b..a9a1d21ac 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -6,14 +6,14 @@ = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) } - = f.simple_fields_for :notification_emails, current_user.settings(:notification_emails) do |ff| + = f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff| = ff.input :follow, as: :boolean, wrapper: :with_label = ff.input :follow_request, as: :boolean, wrapper: :with_label = ff.input :reblog, as: :boolean, wrapper: :with_label = ff.input :favourite, as: :boolean, wrapper: :with_label = ff.input :mention, as: :boolean, wrapper: :with_label - = f.simple_fields_for :interactions, current_user.settings(:interactions) do |ff| + = f.simple_fields_for :interactions, hash_to_object(current_user.settings.interactions) do |ff| = ff.input :must_be_follower, as: :boolean, wrapper: :with_label = ff.input :must_be_following, as: :boolean, wrapper: :with_label -- cgit From e45fed58cb4a735e6429eadba3171f81c0dd5fa0 Mon Sep 17 00:00:00 2001 From: Effy Elden Date: Sun, 15 Jan 2017 11:03:35 +1100 Subject: Add a textual 'Back to Mastodon' link in footer of settings pages --- app/views/settings/shared/_links.html.haml | 1 + config/locales/en.yml | 1 + 2 files changed, 2 insertions(+) (limited to 'app/views/settings') diff --git a/app/views/settings/shared/_links.html.haml b/app/views/settings/shared/_links.html.haml index 44f097950..a6e90f457 100644 --- a/app/views/settings/shared/_links.html.haml +++ b/app/views/settings/shared/_links.html.haml @@ -5,3 +5,4 @@ %li= link_to t('settings.preferences'), settings_preferences_path - if controller_name != 'registrations' %li= link_to t('auth.change_password'), edit_user_registration_path + %li= link_to t('settings.back'), root_path \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index bc369fc35..128a4d40e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -90,6 +90,7 @@ en: settings: edit_profile: Edit profile preferences: Preferences + back: Back to Mastodon stream_entries: click_to_show: Click to show favourited: favourited a post by -- cgit