Skip to content

Commit 62e8c83

Browse files
committed
Fixed the link to the help page. It did not support a Redmine install not in the site root.
1 parent 5c725c7 commit 62e8c83

File tree

1 file changed

+6
-3
lines changed
  • app/helpers/redmine_markdown_formatter

1 file changed

+6
-3
lines changed

app/helpers/redmine_markdown_formatter/helper.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ module Helper
33
unloadable
44

55
def wikitoolbar_for(field_id)
6-
file = Engines::RailsExtensions::AssetHelpers.plugin_asset_path('redmine_markdown_formatter', 'help', 'markdown_syntax.html')
6+
7+
url = Redmine::Utils.relative_url_root +
8+
Engines::RailsExtensions::AssetHelpers.plugin_asset_path('redmine_markdown_formatter', 'help', 'markdown_syntax.html')
9+
710
help_link = l(:setting_text_formatting) + ': ' +
8-
link_to(l(:label_help), file,
9-
:onclick => "window.open(\"#{file}\", \"\", \"resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes\"); return false;")
11+
link_to(l(:label_help), url,
12+
:onclick => "window.open(\"#{url}\", \"\", \"resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes\"); return false;")
1013

1114
javascript_include_tag('jstoolbar/jstoolbar') +
1215
javascript_include_tag('markdown', :plugin => 'redmine_markdown_formatter') +

0 commit comments

Comments
 (0)