Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-06-05 22:50:36 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-06-14 00:58:16 +0300
commit844d72716e2175dcd5e39b4d1eecb9e3560aa0b9 (patch)
tree0df35c04333f7fb8dd970f0c984251952525663a /app/views/profiles/preferences
parent658b42b1fa79c77b1acef67a645b36a2928a71bd (diff)
Add Gitlab::Themes module; remove Gitlab::Theme
Now we can simply loop through all themes, among other things. This also removes the `dark_theme` / `light_theme` classes and the `theme_type` helper, since they weren't used anywhere.
Diffstat (limited to 'app/views/profiles/preferences')
-rw-r--r--app/views/profiles/preferences/show.html.haml35
-rw-r--r--app/views/profiles/preferences/update.js.erb4
2 files changed, 6 insertions, 33 deletions
diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml
index 2fc47227c38..a30f302dea7 100644
--- a/app/views/profiles/preferences/show.html.haml
+++ b/app/views/profiles/preferences/show.html.haml
@@ -10,38 +10,11 @@
.panel-heading
Application theme
.panel-body
- .themes_opts
+ - Gitlab::Themes.each do |theme|
= 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
+ .preview{class: theme.css_class}
+ = f.radio_button :theme_id, theme.id
+ = theme.name
.panel.panel-default.code-preview-theme
.panel-heading
diff --git a/app/views/profiles/preferences/update.js.erb b/app/views/profiles/preferences/update.js.erb
index db37619136d..830df228557 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::Theme.body_classes %>')
-$('body').addClass('<%= app_theme %> <%= theme_type %>')
+$('body').removeClass('<%= Gitlab::Themes.body_classes %>')
+$('body').addClass('<%= app_theme %>')