From e54e30b7157bcfc0e152b7193858265280c203c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sat, 25 Jan 2014 23:53:52 +0100 Subject: [PATCH] Bugfix: In redmine 2.3.1.stable, the path to the svg file was absolute but didn't include the path to redmine's root. This meant one would get "/graphs/target-version/1" instead of "/redmine/graphs/target-version/1". This commit fixes the bug by prepending Redmine::Utils.relative_url_root . --- lib/target_version_graph_hook.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/target_version_graph_hook.rb b/lib/target_version_graph_hook.rb index 74130be..fe9ea5b 100644 --- a/lib/target_version_graph_hook.rb +++ b/lib/target_version_graph_hook.rb @@ -3,7 +3,7 @@ class TargetVersionGraphHook < Redmine::Hook::ViewListener def view_versions_show_bottom(context = { }) if !context[:version].fixed_issues.empty? output = "
#{ l(:label_graphs_total_vs_closed_issues) }" - output << tag("embed", :width => "100%", :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'graphs', :action => 'target_version_graph', :id => context[:version])) + output << tag("embed", :width => "100%", :height => 300, :type => "image/svg+xml", :src => File.join(Redmine::Utils.relative_url_root, url_for(:controller => 'graphs', :action => 'target_version_graph', :id => context[:version]))) output << "
" return output end