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:
parent
9244f67e28
commit
12fe8a595f
@ -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
|
||||
|
||||
@ -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)
|
||||
@ -141,3 +129,15 @@ module ApplicationHelper
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user