aboutsummaryrefslogtreecommitdiff
path: root/poll.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-10-07 20:32:33 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-10-07 20:32:33 +0200
commitc527ee80f868e9652921d3c8155d0165bf3f1df4 (patch)
treefc8286d7691874aa1fb5389356b4f1aafc4f2e00 /poll.rb
parent26183d873449445ad0f5f7e20ba55c1d7591f328 (diff)
new feature: added hint, when nothing is configured
Diffstat (limited to 'poll.rb')
-rw-r--r--poll.rb28
1 files changed, 27 insertions, 1 deletions
diff --git a/poll.rb b/poll.rb
index b8feca3..ce008ab 100644
--- a/poll.rb
+++ b/poll.rb
@@ -64,6 +64,32 @@ EDITDELETE
ret
end
def to_html(config = false,activecolumn = nil)
+ if VCS.revno == 1 && !config
+ return <<HINT
+<pre
+ style="font-family:Courier New,Courier,monospace;
+ letter-spacing:0;
+ margin-top: -8ex;
+ line-height:95%;"
+>
+ .
+ .:;:.
+.:;;;;;:.
+ ;;;;;
+ ;;;;;
+ ;;;;;
+ ;;;;; Please press the config link on
+ ;:;;; the top left corner of this page
+ ;;; : to configure this poll!
+ ;:;
+ ;.: .
+ : .
+ . .
+
+ .
+</pre>
+HINT
+ end
ret = "<table border='1'>\n"
ret += head_to_html(config, activecolumn)
@@ -75,7 +101,7 @@ EDITDELETE
ret += "</td>\n"
@head.sort.each{|columntitle,columndescription|
klasse = poll[columntitle]
- case klasse
+ case klasse
when nil
value = UNKNOWN
klasse = "undecided"