diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-05 22:53:57 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-14 00:58:16 +0300 |
commit | 8112f7550b70c83bde2f74ed48e7781c5424ebb9 (patch) | |
tree | 901945d778c172754ff408832f26c8a2b39a3def /app/views | |
parent | 844d72716e2175dcd5e39b4d1eecb9e3560aa0b9 (diff) |
Add PreferencesHelper module
Consolidates the helpers related to user preferences.
Renames `app_theme` to `user_application_theme` to better explain what
it is.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/application.html.haml | 6 | ||||
-rw-r--r-- | app/views/layouts/errors.html.haml | 2 | ||||
-rw-r--r-- | app/views/profiles/preferences/update.js.erb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 173033f7eab..678ed3c2c1f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,10 +1,10 @@ !!! 5 %html{ lang: "en"} = render "layouts/head" - %body{class: "#{app_theme}", :'data-page' => body_data_page} - / Ideally this would be inside the head, but turbolinks only evaluates page-specific JS in the body. + %body{class: "#{user_application_theme}", 'data-page' => body_data_page} + -# Ideally this would be inside the head, but turbolinks only evaluates page-specific JS in the body. = yield :scripts_body_top - + - if current_user = render "layouts/header/default", title: header_title - else diff --git a/app/views/layouts/errors.html.haml b/app/views/layouts/errors.html.haml index 2e3a2b16eb7..2af265a2296 100644 --- a/app/views/layouts/errors.html.haml +++ b/app/views/layouts/errors.html.haml @@ -1,7 +1,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head" - %body{class: "#{app_theme} application"} + %body{class: "#{user_application_theme} application"} = render "layouts/header/empty" .container.navless-container = render "layouts/flash" diff --git a/app/views/profiles/preferences/update.js.erb b/app/views/profiles/preferences/update.js.erb index 830df228557..cd2c5b632e0 100644 --- a/app/views/profiles/preferences/update.js.erb +++ b/app/views/profiles/preferences/update.js.erb @@ -1,3 +1,3 @@ // Remove body class for any previous theme, re-add current one $('body').removeClass('<%= Gitlab::Themes.body_classes %>') -$('body').addClass('<%= app_theme %>') +$('body').addClass('<%= user_application_theme %>') |