]> source.dussan.org Git - redmine.git/commitdiff
Don't reopen ApplicationHelper (#20507).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 19 Oct 2015 18:03:51 +0000 (18:03 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 19 Oct 2015 18:03:51 +0000 (18:03 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@14695 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb
lib/redmine/themes.rb

index 9c9f29dea38a4c39316d2414b6d5fef3f86eccf7..b76c9c4f0c6aa4be79bd9b2695f964ed0595402e 100644 (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
index a9a59bb8e1e69b40d90daa80bc508328e13361b6..9792d1061983d1d0fd333eddf28486add9cf207c 100644 (file)
@@ -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