From 38a9fc4f4701ff3f2d1a06e8567f45d1bb9fb9c6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Date: Thu, 20 Jun 2013 11:46:54 +0300 Subject: [PATCH] Classic (mars) theme will be default for 6.0 --- app/models/user.rb | 1 + lib/gitlab/theme.rb | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 6a5411b222d..8efae30f35e 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 7f833867e39..89604162304 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 -- GitLab