diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-05 13:57:01 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-13 17:58:16 -0400 |
commit | 0c0c31ff34b3010c2c269ec56ef48dd305c6f74a (patch) | |
tree | bc9bfe8512f3a7abc694f77bdd4824ed7d80b3de /app/views | |
parent | 44d68159999a0ee30f7714470c1ef5b0c4a717fa (diff) | |
download | gitlab-ce-0c0c31ff34b3010c2c269ec56ef48dd305c6f74a.tar.gz |
Move the "Design" templates and logic to Preferences
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/profiles/design.html.haml | 56 | ||||
-rw-r--r-- | app/views/profiles/preferences/show.html.haml | 57 | ||||
-rw-r--r-- | app/views/profiles/preferences/update.js.erb | 4 | ||||
-rw-r--r-- | app/views/profiles/update.js.erb | 3 |
4 files changed, 59 insertions, 61 deletions
diff --git a/app/views/profiles/design.html.haml b/app/views/profiles/design.html.haml deleted file mode 100644 index f450ec1c018..00000000000 --- a/app/views/profiles/design.html.haml +++ /dev/null @@ -1,56 +0,0 @@ -- page_title "Design" -%h3.page-title - = page_title -%p.light - Appearance settings will be saved to your profile and made available across all devices. -%hr - -= form_for @user, url: profile_path, remote: true, method: :put do |f| - .panel.panel-default.application-theme - .panel-heading - Application theme - .panel-body - .themes_opts - = label_tag do - .prev.default - = f.radio_button :theme_id, 1 - Graphite - - = label_tag do - .prev.classic - = f.radio_button :theme_id, 2 - Charcoal - - = label_tag do - .prev.modern - = f.radio_button :theme_id, 3 - Green - - = label_tag do - .prev.gray - = f.radio_button :theme_id, 4 - Gray - - = label_tag do - .prev.violet - = f.radio_button :theme_id, 5 - Violet - - = label_tag do - .prev.blue - = f.radio_button :theme_id, 6 - Blue - %br - .clearfix - - .panel.panel-default.code-preview-theme - .panel-heading - Code preview theme - .panel-body - .code_highlight_opts - - color_schemes.each do |color_scheme_id, color_scheme| - = label_tag do - .prev - = image_tag "#{color_scheme}-scheme-preview.png" - = f.radio_button :color_scheme_id, color_scheme_id - = color_scheme.gsub(/[-_]+/, ' ').humanize diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 1333ed77b7e..2fc47227c38 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -1 +1,56 @@ -TODO +- page_title "Design" +%h3.page-title + = page_title +%p.light + Appearance settings will be saved to your profile and made available across all devices. +%hr + += form_for @user, url: profile_preferences_path, remote: true, method: :put do |f| + .panel.panel-default.application-theme + .panel-heading + Application theme + .panel-body + .themes_opts + = label_tag do + .prev.default + = f.radio_button :theme_id, 1 + Graphite + + = label_tag do + .prev.classic + = f.radio_button :theme_id, 2 + Charcoal + + = label_tag do + .prev.modern + = f.radio_button :theme_id, 3 + Green + + = label_tag do + .prev.gray + = f.radio_button :theme_id, 4 + Gray + + = label_tag do + .prev.violet + = f.radio_button :theme_id, 5 + Violet + + = label_tag do + .prev.blue + = f.radio_button :theme_id, 6 + Blue + %br + .clearfix + + .panel.panel-default.code-preview-theme + .panel-heading + Code preview theme + .panel-body + .code_highlight_opts + - color_schemes.each do |color_scheme_id, color_scheme| + = label_tag do + .prev + = image_tag "#{color_scheme}-scheme-preview.png" + = f.radio_button :color_scheme_id, color_scheme_id + = color_scheme.gsub(/[-_]+/, ' ').humanize diff --git a/app/views/profiles/preferences/update.js.erb b/app/views/profiles/preferences/update.js.erb index 70b786d12ed..db37619136d 100644 --- a/app/views/profiles/preferences/update.js.erb +++ b/app/views/profiles/preferences/update.js.erb @@ -1 +1,3 @@ -// TODO +// Remove body class for any previous theme, re-add current one +$('body').removeClass('<%= Gitlab::Theme.body_classes %>') +$('body').addClass('<%= app_theme %> <%= theme_type %>') diff --git a/app/views/profiles/update.js.erb b/app/views/profiles/update.js.erb deleted file mode 100644 index db37619136d..00000000000 --- a/app/views/profiles/update.js.erb +++ /dev/null @@ -1,3 +0,0 @@ -// Remove body class for any previous theme, re-add current one -$('body').removeClass('<%= Gitlab::Theme.body_classes %>') -$('body').addClass('<%= app_theme %> <%= theme_type %>') |