summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-04 12:50:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-04 12:50:45 +0000
commit748fb30f587f800879fe5fcdf75378d277736b2e (patch)
tree36cd4ced396dcbf2ee6461b9636774daecbfc3d4 /lib
parent2644141a3692e62e955a521d0d683e12702cf01a (diff)
downloadredmine-748fb30f587f800879fe5fcdf75378d277736b2e.tar.gz
redmine-748fb30f587f800879fe5fcdf75378d277736b2e.zip
Do not use compute_public_path.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2228 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/wiki_formatting/textile/helper.rb8
1 files 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') +