diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2011-05-26 15:46:01 +0200 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2011-05-26 15:46:01 +0200 |
commit | 388ad0a2b2bd88d56cd38a9755ca2c23928c4bdb (patch) | |
tree | 026c646ebb86d60baf7a0c2caab9187bf3867a6c /poll.rb | |
parent | 94568a50e9bdf631d9594c6794300e280cdce175 (diff) |
add possibility to hook into table rendering
Diffstat (limited to 'poll.rb')
-rw-r--r-- | poll.rb | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -49,6 +49,12 @@ class Poll YESVAL = "a_yes__" MAYBEVAL = "b_maybe" NOVAL = "c_no___" + + @@table_html_hooks = [] + def Poll.table_html_hooks + @@table_html_hooks + end + def initialize name,type @name = name @@ -133,6 +139,8 @@ class Poll end } + @@table_html_hooks.each{|hook| ret += hook.call(ret)} + # PARTICIPATE ret += participate_to_html unless @data.keys.include?($cgi["edituser"]) || !showparticipation |