Permalink
Browse files

Set up partial on issue form view hook

  • Loading branch information...
1 parent 7c98daa commit 5e5e109bd3fe8ecdafd69e43e5e76d0414f11c10 @abahgat committed Jan 14, 2012
Showing with 10 additions and 0 deletions.
  1. +3 −0 app/views/issues/_didyoumean_injected.html.erb
  2. +2 −0 init.rb
  3. +5 −0 lib/redmine_didyoumean/hooks/didyoumean_hooks.rb
View
3 app/views/issues/_didyoumean_injected.html.erb
@@ -0,0 +1,3 @@
+<script type='text/javascript'>
+ alert('test');
+</script>
View
2 init.rb
@@ -8,3 +8,5 @@
url 'http://www.github.com/abahgat/didyoumean'
author_url 'http://abahgat.com/'
end
+
+require 'redmine_didyoumean/hooks/didyoumean_hooks'
View
5 lib/redmine_didyoumean/hooks/didyoumean_hooks.rb
@@ -0,0 +1,5 @@
+module DidYouMean
+ class DidYouMeanHooks < Redmine::Hook::ViewListener
+ render_on(:view_issues_form_details_bottom, :partial => 'didyoumean_injected.html.erb')
+ end
+end

0 comments on commit 5e5e109

Please sign in to comment.