diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-26 00:15:10 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-26 00:15:10 +0100 |
commit | 54386017ceacacb2a6990a29bffc7f93982572e4 (patch) | |
tree | 762f8f6b6aa504ca7ffc767bd5c43e1c2212e3ea /help.rb | |
parent | 5ebf12ea5b30cd9a7c5c31bff087d7703f1e149c (diff) |
heavy code restructuring, moved common code to dudle.rb
Diffstat (limited to '')
-rwxr-xr-x | help.rb | 34 |
1 files changed, 7 insertions, 27 deletions
@@ -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&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 |