diff options
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/themes.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/lib/themes.rb b/app/lib/themes.rb index f7ec22fd2..7ced9f945 100644 --- a/app/lib/themes.rb +++ b/app/lib/themes.rb @@ -7,15 +7,27 @@ class Themes include Singleton def initialize + + core = YAML.load_file(Rails.root.join('app', 'javascript', 'core', 'theme.yml')) + core['pack'] = Hash.new unless core['pack'] + result = Hash.new Dir.glob(Rails.root.join('app', 'javascript', 'themes', '*', 'theme.yml')) do |path| data = YAML.load_file(path) name = File.basename(File.dirname(path)) if data['pack'] + data['name'] = name result[name] = data end end + + @core = core @conf = result + + end + + def core + @core end def get(name) |