1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-23 17:01:13 +00:00

Don't reopen ApplicationHelper (#20507).

git-svn-id: http://svn.redmine.org/redmine/trunk@14695 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2015-10-19 18:03:51 +00:00
parent 9244f67e28
commit 12fe8a595f
2 changed files with 17 additions and 16 deletions

View File

@ -26,6 +26,7 @@ module ApplicationHelper
include GravatarHelper::PublicMethods include GravatarHelper::PublicMethods
include Redmine::Pagination::Helper include Redmine::Pagination::Helper
include Redmine::SudoMode::Helper include Redmine::SudoMode::Helper
include Redmine::Themes::Helper
include Redmine::Hook::Helper include Redmine::Hook::Helper
extend Forwardable extend Forwardable

View File

@ -114,6 +114,22 @@ module Redmine
end end
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 private
def self.scan_themes def self.scan_themes
@ -125,19 +141,3 @@ module Redmine
end end
end 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