Do not use compute_public_path.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2228 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-01-04 12:50:45 +00:00
parent 2644141a36
commit 748fb30f58
1 changed files with 6 additions and 2 deletions

View File

@ -20,9 +20,13 @@ module Redmine
module Textile module Textile
module Helper module Helper
def wikitoolbar_for(field_id) def wikitoolbar_for(field_id)
# Is there a simple way to link to a public resource?
prefix = (ActionController::Base.respond_to?(:relative_url_root) ? ActionController::Base.relative_url_root : ActionController::AbstractRequest.relative_url_root)
url = "#{prefix}/help/wiki_syntax.html"
help_link = l(:setting_text_formatting) + ': ' + help_link = l(:setting_text_formatting) + ': ' +
link_to(l(:label_help), compute_public_path('wiki_syntax', 'help', 'html'), link_to(l(:label_help), url,
:onclick => "window.open(\"#{ compute_public_path('wiki_syntax', 'help', 'html') }\", \"\", \"resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes\"); return false;") :onclick => "window.open(\"#{ url }\", \"\", \"resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes\"); return false;")
javascript_include_tag('jstoolbar/jstoolbar') + javascript_include_tag('jstoolbar/jstoolbar') +
javascript_include_tag('jstoolbar/textile') + javascript_include_tag('jstoolbar/textile') +