diff --git a/app/models/user.rb b/app/models/user.rb index 6a5411b..8efae30 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -205,6 +205,7 @@ class User < ActiveRecord::Base u.projects_limit = Gitlab.config.gitlab.default_projects_limit u.can_create_group = Gitlab.config.gitlab.default_can_create_group u.can_create_team = Gitlab.config.gitlab.default_can_create_team + u.theme_id = Gitlab::Theme::MARS end end diff --git a/lib/gitlab/theme.rb b/lib/gitlab/theme.rb index 7f83386..8960416 100644 --- a/lib/gitlab/theme.rb +++ b/lib/gitlab/theme.rb @@ -1,12 +1,18 @@ module Gitlab class Theme + BASIC = 1 + MARS = 2 + MODERN = 3 + GRAY = 4 + COLOR = 5 + def self.css_class_by_id(id) themes = { - 1 => "ui_basic", - 2 => "ui_mars", - 3 => "ui_modern", - 4 => "ui_gray", - 5 => "ui_color" + BASIC => "ui_basic", + MARS => "ui_mars", + MODERN => "ui_modern", + GRAY => "ui_gray", + COLOR => "ui_color" } id ||= 1 -- libgit2 0.21.2