From 0e8d1d9d28d127704897bb9fb4ea06105a1d0f84 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Thu, 19 Nov 2009 20:00:05 +0100 Subject: startet to use html element for output --- participate.rb | 59 ++++++++++++++++++++-------------------------------------- 1 file changed, 20 insertions(+), 39 deletions(-) (limited to 'participate.rb') diff --git a/participate.rb b/participate.rb index d13ea7d..7f8dce2 100755 --- a/participate.rb +++ b/participate.rb @@ -7,26 +7,18 @@ ################################ require "yaml" -require "cgi" - if __FILE__ == $0 +require "cgi" + $cgi = CGI.new -$header = {} -$header["type"] = "text/html" -#$header["type"] = "application/xhtml+xml" -$header["charset"] = "utf-8" - -$htmlout = < - -HEAD olddir = File.expand_path(".") Dir.chdir("..") +require "html" +$html = HTML.new require "poll" load "charset.rb" load "config.rb" @@ -56,34 +48,23 @@ else table.add_comment($cgi["commentname"],$cgi["comment"]) if $cgi["comment"] != "" table.delete_comment($cgi["delete_comment"].to_i) if $cgi.include?("delete_comment") end +$html.add_css("../dudle.css") +$html.add_css("../print.css","print") -$htmlout += < - - - dudle - #{table.name} - - - -HEAD +$html.add_atom("atom.cgi") if File.exists?("../atom.rb") +$html.add_head("dudle - #{table.name}") + +$html.htmlout += "" + +$html.add_tabs -$htmlout += '' if File.exists?("../atom_single.rb") - -$htmlout += < - -
- -
+$html.htmlout += < HEAD # TABLE if VCS.revno == 1 - $htmlout += <#{table.name}
     .
@@ -104,7 +85,7 @@ if VCS.revno == 1
 
HINT else - $htmlout += <history:#{table.history_to_html}

#{table.name}

@@ -114,13 +95,13 @@ else
TABLE - $htmlout += table.comment_to_html + $html.htmlout += table.comment_to_html end -$htmlout += "" +$html.htmlout += "" -$htmlout += "" +$html.htmlout += "" -$header["Cache-Control"] = "no-cache" -$cgi.out($header){$htmlout} +$html.header["Cache-Control"] = "no-cache" +$cgi.out($html.header){$html.htmlout} end -- cgit v1.2.3