@@ -26,6 +26,7 module ApplicationHelper | |||
|
26 | 26 | include GravatarHelper::PublicMethods |
|
27 | 27 | include Redmine::Pagination::Helper |
|
28 | 28 | include Redmine::SudoMode::Helper |
|
29 | include Redmine::Themes::Helper | |
|
29 | 30 | include Redmine::Hook::Helper |
|
30 | 31 | |
|
31 | 32 | extend Forwardable |
@@ -114,19 +114,7 module Redmine | |||
|
114 | 114 | end |
|
115 | 115 | end |
|
116 | 116 | |
|
117 | private | |
|
118 | ||
|
119 | def self.scan_themes | |
|
120 | dirs = Dir.glob("#{Rails.public_path}/themes/*").select do |f| | |
|
121 | # A theme should at least override application.css | |
|
122 | File.directory?(f) && File.exist?("#{f}/stylesheets/application.css") | |
|
123 | end | |
|
124 | dirs.collect {|dir| Theme.new(dir)}.sort | |
|
125 | end | |
|
126 | end | |
|
127 | end | |
|
128 | ||
|
129 | module ApplicationHelper | |
|
117 | module Helper | |
|
130 | 118 | def current_theme |
|
131 | 119 | unless instance_variable_defined?(:@current_theme) |
|
132 | 120 | @current_theme = Redmine::Themes.theme(Setting.ui_theme) |
@@ -141,3 +129,15 module ApplicationHelper | |||
|
141 | 129 | end |
|
142 | 130 | end |
|
143 | 131 | end |
|
132 | ||
|
133 | private | |
|
134 | ||
|
135 | def self.scan_themes | |
|
136 | dirs = Dir.glob("#{Rails.public_path}/themes/*").select do |f| | |
|
137 | # A theme should at least override application.css | |
|
138 | File.directory?(f) && File.exist?("#{f}/stylesheets/application.css") | |
|
139 | end | |
|
140 | dirs.collect {|dir| Theme.new(dir)}.sort | |
|
141 | end | |
|
142 | end | |
|
143 | end |
General Comments 0
You need to be logged in to leave comments.
Login now