redmine-graphs-plugin/lib/target_version_graph_hook.rb
2009-03-05 09:25:27 -08:00

8 lines
388 B
Ruby
Executable File

# Provides a graph on the target version page
class TargetVersionGraphHook < Redmine::Hook::ViewListener
def view_versions_show_bottom(context = { })
if !context[:version].fixed_issues.empty?
return tag("embed", :width => 800, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'graphs', :action => 'target_version', :id => context[:version]))
end
end
end