Module: Redmine::Themes::Helper

Included in:
ApplicationHelper
Defined in:
lib/redmine/themes.rb

Instance Method Summary collapse

Instance Method Details

#current_themeObject



135
136
137
138
139
140
# File 'lib/redmine/themes.rb', line 135

def current_theme
  unless instance_variable_defined?(:@current_theme)
    @current_theme = Redmine::Themes.theme(Setting.ui_theme)
  end
  @current_theme
end

#heads_for_themeObject

Returns the header tags for the current theme



143
144
145
146
147
# File 'lib/redmine/themes.rb', line 143

def heads_for_theme
  if current_theme && current_theme.javascripts.include?('theme')
    javascript_include_tag current_theme.javascript_path('theme')
  end
end