diff options
Diffstat (limited to 'app/lib/themes.rb')
-rw-r--r-- | app/lib/themes.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/lib/themes.rb b/app/lib/themes.rb index 243ffb9ab..2dd188297 100644 --- a/app/lib/themes.rb +++ b/app/lib/themes.rb @@ -7,7 +7,14 @@ class Themes include Singleton def initialize - @conf = YAML.load_file(Rails.root.join('config', 'themes.yml')) + result = Hash.new + Dir.glob(Rails.root.join('app', 'javascript', 'themes', '*', 'theme.yml')) do |path| + data = YAML.load_file(path) + if data['pack'] && data['name'] + result[data['name']] = data + end + end + @conf = result end def names |