Skip to content

Commit

Permalink
Fix link to help page so it works for Redmine installs that are not t…
Browse files Browse the repository at this point in the history
…he site root.
  • Loading branch information
James Van Lommel committed Aug 5, 2010
1 parent f08f560 commit e227566
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/helpers/redmine_markdown_extra_formatter/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ module Helper
unloadable

def wikitoolbar_for(field_id)
file = Engines::RailsExtensions::AssetHelpers.plugin_asset_path('redmine_markdown_extra_formatter', 'help', 'markdown_extra_syntax.html')
url = Redmine::Utils.relative_url_root +
Engines::RailsExtensions::AssetHelpers.plugin_asset_path('redmine_markdown_extra_formatter', 'help', 'markdown_extra_syntax.html')
help_link = l(:setting_text_formatting) + ': ' +
link_to(l(:label_help), file,
:onclick => "window.open(\"#{file}\", \"\", \"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('markdown_extra', :plugin => 'redmine_markdown_extra_formatter') +
Expand Down

0 comments on commit e227566

Please sign in to comment.