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 Redmine::Pagination::Helper
include Redmine::SudoMode::Helper
include Redmine::Themes::Helper
include Redmine::Hook::Helper
extend Forwardable

View File

@ -114,19 +114,7 @@ module Redmine
end
end
private
def self.scan_themes
dirs = Dir.glob("#{Rails.public_path}/themes/*").select do |f|
# A theme should at least override application.css
File.directory?(f) && File.exist?("#{f}/stylesheets/application.css")
end
dirs.collect {|dir| Theme.new(dir)}.sort
end
end
end
module ApplicationHelper
module Helper
def current_theme
unless instance_variable_defined?(:@current_theme)
@current_theme = Redmine::Themes.theme(Setting.ui_theme)
@ -140,4 +128,16 @@ module ApplicationHelper
javascript_include_tag current_theme.javascript_path('theme')
end
end
end
private
def self.scan_themes
dirs = Dir.glob("#{Rails.public_path}/themes/*").select do |f|
# A theme should at least override application.css
File.directory?(f) && File.exist?("#{f}/stylesheets/application.css")
end
dirs.collect {|dir| Theme.new(dir)}.sort
end
end
end