2012-06-11 17:52:32 +00:00
|
|
|
module Gitlab
|
|
|
|
class Theme
|
2014-07-16 18:12:46 +00:00
|
|
|
BASIC = 1 unless const_defined?(:BASIC)
|
|
|
|
MARS = 2 unless const_defined?(:MARS)
|
|
|
|
MODERN = 3 unless const_defined?(:MODERN)
|
|
|
|
GRAY = 4 unless const_defined?(:GRAY)
|
|
|
|
COLOR = 5 unless const_defined?(:COLOR)
|
2013-06-20 08:46:54 +00:00
|
|
|
|
2012-06-11 17:52:32 +00:00
|
|
|
def self.css_class_by_id(id)
|
2012-11-21 04:14:05 +00:00
|
|
|
themes = {
|
2013-06-20 08:46:54 +00:00
|
|
|
BASIC => "ui_basic",
|
|
|
|
MARS => "ui_mars",
|
|
|
|
MODERN => "ui_modern",
|
|
|
|
GRAY => "ui_gray",
|
|
|
|
COLOR => "ui_color"
|
2012-06-11 17:52:32 +00:00
|
|
|
}
|
|
|
|
|
2014-01-10 11:58:52 +00:00
|
|
|
id ||= Gitlab.config.gitlab.default_theme
|
2012-06-11 17:52:32 +00:00
|
|
|
|
|
|
|
return themes[id]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|