From 748fb30f587f800879fe5fcdf75378d277736b2e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 4 Jan 2009 12:50:45 +0000 Subject: [PATCH] Do not use compute_public_path. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2228 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting/textile/helper.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/redmine/wiki_formatting/textile/helper.rb b/lib/redmine/wiki_formatting/textile/helper.rb index af021f990..22fa35783 100644 --- a/lib/redmine/wiki_formatting/textile/helper.rb +++ b/lib/redmine/wiki_formatting/textile/helper.rb @@ -20,9 +20,13 @@ module Redmine module Textile module Helper 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) + ': ' + - link_to(l(:label_help), compute_public_path('wiki_syntax', 'help', 'html'), - :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;") + link_to(l(:label_help), url, + :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/textile') +