From 74df3ba1d73dc8760e7f9fa20e7f11c0bef0a110 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 21 Nov 2016 23:05:11 +0100 Subject: [PATCH] Local accounts can control "silenced" attribute which removes them from public timeline --- app/controllers/settings/profiles_controller.rb | 2 +- app/views/settings/profiles/show.html.haml | 1 + config/locales/simple_form.de.yml | 1 + config/locales/simple_form.en.yml | 1 + config/locales/simple_form.es.yml | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/settings/profiles_controller.rb b/app/controllers/settings/profiles_controller.rb index deff8fc7e1..4b2b5a1316 100644 --- a/app/controllers/settings/profiles_controller.rb +++ b/app/controllers/settings/profiles_controller.rb @@ -20,7 +20,7 @@ class Settings::ProfilesController < ApplicationController private def account_params - params.require(:account).permit(:display_name, :note, :avatar, :header) + params.require(:account).permit(:display_name, :note, :avatar, :header, :silenced) end def set_account diff --git a/app/views/settings/profiles/show.html.haml b/app/views/settings/profiles/show.html.haml index c2f1adb12e..e5f8a46c45 100644 --- a/app/views/settings/profiles/show.html.haml +++ b/app/views/settings/profiles/show.html.haml @@ -8,6 +8,7 @@ = f.input :note, placeholder: t('simple_form.labels.defaults.note') = f.input :avatar, wrapper: :with_label = f.input :header, wrapper: :with_label + = f.input :silenced, as: :boolean, wrapper: :with_label .actions = f.button :button, t('generic.save_changes'), type: :submit diff --git a/config/locales/simple_form.de.yml b/config/locales/simple_form.de.yml index 6e6758df28..65714dbd52 100644 --- a/config/locales/simple_form.de.yml +++ b/config/locales/simple_form.de.yml @@ -15,6 +15,7 @@ de: note: Über mich password: Passwort username: Nutzername + silenced: Öffentliche Beiträge nicht auflisten notification_emails: favourite: E-mail senden, wenn jemand meinen Beitrag favorisiert follow: E-mail senden, wenn mir jemand folgt diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index b8a69a0751..5b66fccd5d 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -15,6 +15,7 @@ en: note: Bio password: Password username: Username + silenced: Unlisted mode notification_emails: favourite: Send e-mail when someone favourites your status follow: Send e-mail when someone follows you diff --git a/config/locales/simple_form.es.yml b/config/locales/simple_form.es.yml index 1ac863b67f..1909474a11 100644 --- a/config/locales/simple_form.es.yml +++ b/config/locales/simple_form.es.yml @@ -15,6 +15,7 @@ es: note: Biografía password: Contraseña username: Nombre de usuario + silenced: No listado notification_emails: favourite: Enviar correo electrónico cuando alguien de a favorito en su publicación follow: Enviar correo electrónico cuando alguien le siga