diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-05 20:57:01 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-14 00:58:16 +0300 |
commit | 0c0c31ff34b3010c2c269ec56ef48dd305c6f74a (patch) | |
tree | bc9bfe8512f3a7abc694f77bdd4824ed7d80b3de /app/views/profiles/preferences | |
parent | 44d68159999a0ee30f7714470c1ef5b0c4a717fa (diff) |
Move the "Design" templates and logic to Preferences
Diffstat (limited to 'app/views/profiles/preferences')
-rw-r--r-- | app/views/profiles/preferences/show.html.haml | 57 | ||||
-rw-r--r-- | app/views/profiles/preferences/update.js.erb | 4 |
2 files changed, 59 insertions, 2 deletions
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 %>') |