aboutsummaryrefslogtreecommitdiff
path: root/help.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-26 00:15:10 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-26 00:15:10 +0100
commit54386017ceacacb2a6990a29bffc7f93982572e4 (patch)
tree762f8f6b6aa504ca7ffc767bd5c43e1c2212e3ea /help.rb
parent5ebf12ea5b30cd9a7c5c31bff087d7703f1e149c (diff)
heavy code restructuring, moved common code to dudle.rb
Diffstat (limited to '')
-rwxr-xr-xhelp.rb34
1 files changed, 7 insertions, 27 deletions
diff --git a/help.rb b/help.rb
index 923476d..7935aea 100755
--- a/help.rb
+++ b/help.rb
@@ -19,33 +19,16 @@
# 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>
+load "../dudle.rb"
+
+$d = Dudle.new("Help")
+
+$d << <<END
The link to your poll is:
<pre>#{SITEURL}</pre>
-<a href='mailto:?subject=dudle%20link&body=#{SITEURL}'>Send this link via email...</a>
+<a href='mailto:?subject=dudle%20link&amp;body=#{SITEURL}'>Send this link via email...</a>
<form method='get' action='.'>
<div>
<input type='submit' value='To the Vote interface' />
@@ -53,10 +36,7 @@ The link to your poll is:
</form>
END
-$html << "</div>"
-$html << "</body>"
-
-$html.out($cgi)
+$d.out($cgi)
end