diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-19 18:03:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-19 18:03:51 +0000 |
commit | 12fe8a595f0c5e08aea527de09869579eb8f97c7 (patch) | |
tree | 1341bd964ed6716314c4ecb3d727b0d03aae8878 /lib/redmine/themes.rb | |
parent | 9244f67e286233d80ea7f55c368db1a38704b8ef (diff) | |
download | redmine-12fe8a595f0c5e08aea527de09869579eb8f97c7.tar.gz redmine-12fe8a595f0c5e08aea527de09869579eb8f97c7.zip |
Don't reopen ApplicationHelper (#20507).
git-svn-id: http://svn.redmine.org/redmine/trunk@14695 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/themes.rb')
-rw-r--r-- | lib/redmine/themes.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/redmine/themes.rb b/lib/redmine/themes.rb index a9a59bb8e..9792d1061 100644 --- a/lib/redmine/themes.rb +++ b/lib/redmine/themes.rb @@ -114,6 +114,22 @@ module Redmine end end + module Helper + def current_theme + unless instance_variable_defined?(:@current_theme) + @current_theme = Redmine::Themes.theme(Setting.ui_theme) + end + @current_theme + end + + # Returns the header tags for the current theme + def heads_for_theme + if current_theme && current_theme.javascripts.include?('theme') + javascript_include_tag current_theme.javascript_path('theme') + end + end + end + private def self.scan_themes @@ -125,19 +141,3 @@ module Redmine end end end - -module ApplicationHelper - def current_theme - unless instance_variable_defined?(:@current_theme) - @current_theme = Redmine::Themes.theme(Setting.ui_theme) - end - @current_theme - end - - # Returns the header tags for the current theme - def heads_for_theme - if current_theme && current_theme.javascripts.include?('theme') - javascript_include_tag current_theme.javascript_path('theme') - end - end -end |