diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b7fa836..5361191 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -371,6 +371,24 @@ module ApplicationHelper nil end + def theme_favicon + return '/designs/themes/' + current_theme + '/favicon.ico' if profile.nil? || profile.theme.nil? + if File.exists?(File.join(RAILS_ROOT, 'public', theme_path, 'favicon.ico')) + '/designs/themes/' + profile.theme + '/favicon.ico' + else + favicon = profile.articles.find_by_path('favicon.ico') + if favicon + favicon.public_filename + else + '/designs/themes/' + environment.theme + '/favicon.ico' + end + end + end + + def theme_site_title + theme_include('site_title') + end + def theme_header theme_include('header') end diff --git a/app/views/layouts/application-ng.rhtml b/app/views/layouts/application-ng.rhtml index f5c346d..8e1312a 100644 --- a/app/views/layouts/application-ng.rhtml +++ b/app/views/layouts/application-ng.rhtml @@ -6,7 +6,7 @@ - + <%= noosfero_javascript %> <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %> <%= stylesheet_link_tag template_stylesheet_path %> @@ -73,7 +73,7 @@

- <%= link_to content_tag('span', environment.name), environment.top_url %> + <%= theme_site_title %>