diff options
author | Rubén Dávila <ruben@gitlab.com> | 2017-08-17 10:37:36 -0500 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2017-09-06 12:54:09 -0500 |
commit | 6c49a628000605d1beb120431003abb329b9fd16 (patch) | |
tree | 03ede462b30999149411ec70287f6aad2507eb56 /app | |
parent | 8d1321d66977dc50577cf23f7cb0a6e9caa8283e (diff) | |
download | gitlab-ce-6c49a628000605d1beb120431003abb329b9fd16.tar.gz |
Restore some changes from !9199
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/users_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/profiles/preferences_controller.rb | 3 | ||||
-rw-r--r-- | app/helpers/preferences_helper.rb | 4 | ||||
-rw-r--r-- | app/models/user.rb | 1 |
4 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index a99563b7100..635298bc24a 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -211,6 +211,7 @@ class Admin::UsersController < Admin::ApplicationController :provider, :remember_me, :skype, + :theme_id, :twitter, :username, :website_url diff --git a/app/controllers/profiles/preferences_controller.rb b/app/controllers/profiles/preferences_controller.rb index 1e557c47638..cce2a847b53 100644 --- a/app/controllers/profiles/preferences_controller.rb +++ b/app/controllers/profiles/preferences_controller.rb @@ -35,7 +35,8 @@ class Profiles::PreferencesController < Profiles::ApplicationController :color_scheme_id, :layout, :dashboard, - :project_view + :project_view, + :theme_id ) end end diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb index d36bb4ab074..64605908c05 100644 --- a/app/helpers/preferences_helper.rb +++ b/app/helpers/preferences_helper.rb @@ -40,6 +40,10 @@ module PreferencesHelper ] end + def user_application_theme + Gitlab::Themes.for_user(current_user).css_class + end + def user_color_scheme Gitlab::ColorSchemes.for_user(current_user).css_class end diff --git a/app/models/user.rb b/app/models/user.rb index 105eb62f1fa..f75cc21c65c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -35,6 +35,7 @@ class User < ActiveRecord::Base default_value_for :project_view, :files default_value_for :notified_of_own_activity, false default_value_for :preferred_language, I18n.default_locale + default_value_for :theme_id, gitlab_config.default_theme attr_encrypted :otp_secret, key: Gitlab::Application.secrets.otp_key_base, |