aboutsummaryrefslogtreecommitdiff
path: root/help.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-25 19:52:51 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-25 19:52:51 +0100
commitc24a0a07cd0fd93f716d88ce783e1c3499bfe175 (patch)
tree40f360b29cac54012604319fb92d06c72d882254 /help.rb
parentdd6562f05368466d3e4753c023b391d3a4d91175 (diff)
help page added
Diffstat (limited to '')
-rwxr-xr-xhelp.rb62
1 files changed, 62 insertions, 0 deletions
diff --git a/help.rb b/help.rb
new file mode 100755
index 0000000..923476d
--- /dev/null
+++ b/help.rb
@@ -0,0 +1,62 @@
+#!/usr/bin/env ruby
+
+############################################################################
+# Copyright 2009 Benjamin Kellermann #
+# #
+# This file is part of dudle. #
+# #
+# Dudle is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Affero General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# Dudle is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public #
+# License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with dudle. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
+
+require "cgi"
+
+if __FILE__ == $0
+
+$cgi = CGI.new
+olddir = File.expand_path(".")
+Dir.chdir("..")
+load "html.rb"
+load "config.rb"
+require "poll"
+require "yaml"
+Dir.chdir(olddir)
+
+POLL = YAML::load_file("data.yaml").name
+$html = HTML.new("dudle - #{POLL} - Access Control Settings")
+$html.header["Cache-Control"] = "no-cache"
+
+$html.add_css("../dudle.css")
+
+$html << <<END
+<body>
+#{Dudle::tabs("Help")}
+<div id='main'>
+<h1>#{POLL}</h1>
+The link to your poll is:
+<pre>#{SITEURL}</pre>
+<a href='mailto:?subject=dudle%20link&body=#{SITEURL}'>Send this link via email...</a>
+<form method='get' action='.'>
+ <div>
+ <input type='submit' value='To the Vote interface' />
+ </div>
+</form>
+END
+
+$html << "</div>"
+$html << "</body>"
+
+$html.out($cgi)
+end
+
+