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