summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting/textile/helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/wiki_formatting/textile/helper.rb')
-rw-r--r--lib/redmine/wiki_formatting/textile/helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/textile/helper.rb b/lib/redmine/wiki_formatting/textile/helper.rb
index e3865fca5..9b45fd388 100644
--- a/lib/redmine/wiki_formatting/textile/helper.rb
+++ b/lib/redmine/wiki_formatting/textile/helper.rb
@@ -34,11 +34,13 @@ module Redmine
def heads_for_wiki_formatter
unless @heads_for_wiki_formatter_included
+ toolbar_language_options = User.current && User.current.pref.toolbar_language_options
content_for :header_tags do
javascript_include_tag('jstoolbar/jstoolbar') +
javascript_include_tag('jstoolbar/textile') +
javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +
- javascript_tag("var wikiImageMimeTypes = #{Redmine::MimeType.by_type('image').to_json};") +
+ javascript_tag("var wikiImageMimeTypes = #{Redmine::MimeType.by_type('image').to_json};" +
+ "var userHlLanguages = #{(toolbar_language_options.nil? ? UserPreference::DEFAULT_TOOLBAR_LANGUAGE_OPTIONS : toolbar_language_options.split(',')).to_json};") +
stylesheet_link_tag('jstoolbar')
end
@heads_for_wiki_formatter_included = true