Add ability to change an instance default theme from the administration panel (#7092) (#8381)

* Add default_settings class method to ScopedSettings

ScopedSettings was extended to use value of unscoped setting instead of
only using defaults set in config/settings.yml for selected settings.
This adds possibility for admins to set default values of users' settings,
for example default theme (as requested in #7092).

* Add ability to change an instance default theme

Closes #7092
This commit is contained in:
Jakub Mendyk
2018-08-23 14:17:35 +02:00
committed by Eugen Rochko
parent d1c2c917d9
commit 6cb3514d64
6 changed files with 51 additions and 3 deletions

View File

@ -15,6 +15,7 @@
%hr/
.fields-group
= f.input :theme, collection: Themes.instance.names, label_method: lambda { |theme| I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false
= f.input :thumbnail, as: :file, wrapper: :with_block_label, label: t('admin.settings.thumbnail.title'), hint: t('admin.settings.thumbnail.desc_html')
= f.input :hero, as: :file, wrapper: :with_block_label, label: t('admin.settings.hero.title'), hint: t('admin.settings.hero.desc_html')