Commit 705d1057fdb96dc55a784a27ae50ce7b871328e1

Authored by AurelioAHeckert
1 parent c70977ac

ActionItem358: survive without theme.yml

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1758 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
app/helpers/application_helper.rb
@@ -494,10 +494,11 @@ module ApplicationHelper @@ -494,10 +494,11 @@ module ApplicationHelper
494 end 494 end
495 495
496 def theme_javascript() 496 def theme_javascript()
497 - js = YAML.load_file( RAILS_ROOT.to_s() + 497 + conf = RAILS_ROOT.to_s() +
498 '/public/designs/themes/' + 498 '/public/designs/themes/' +
499 current_theme.to_s() + 499 current_theme.to_s() +
500 - '/theme.yml' )['js'] 500 + '/theme.yml'
  501 + js = File.exists?(conf) ? YAML.load_file( )['js'] : []
501 html = [] 502 html = []
502 js.each do |file| 503 js.each do |file|
503 file = '/designs/themes/'+ current_theme.to_s() + 504 file = '/designs/themes/'+ current_theme.to_s() +