#!/usr/bin/env ruby ################################ # Author: Benjamin Kellermann # # License: CC-by-sa 3.0 # # see License # ################################ require "yaml" require "cgi" if __FILE__ == $0 $cgi = CGI.new TYPE = "text/html" #TYPE = "application/xhtml+xml" CHARSET = "utf-8" $htmlout = < HEAD olddir = File.expand_path(".") Dir.chdir("..") load "charset.rb" load "config.rb" require "poll" require "datepoll" require "timepoll" Dir.chdir(olddir) if $cgi.include?("revision") REVISION=$cgi["revision"].to_i table = YAML::load(VCS.cat(REVISION, "data.yaml")) else table = YAML::load_file("data.yaml") table.invite_delete($cgi["invite_delete"]) if $cgi.include?("invite_delete") and $cgi["invite_delete"] != "" table.add_remove_column($cgi["add_remove_column"],$cgi["columndescription"]) if $cgi.include?("add_remove_column") table.toggle_hidden if $cgi.include?("toggle_hidden") end $htmlout += < dudle - config - #{table.name}
#{BACK} history:#{table.history_to_html}
HTMLHEAD $htmlout += <#{table.name} #{table.to_html(config = true)} TABLE $htmlout += <
invite/delete participant
INVITEDELETE # ADD/REMOVE COLUMN $htmlout +=<
add/remove column #{table.add_remove_column_htmlform}
ADD_REMOVE $htmlout +=<
Toggle Hidden flag
HIDDEN $htmlout += "" $htmlout += "" $cgi.out("type" => TYPE ,"charset" => CHARSET,"cookie" => $utfcookie, "Cache-Control" => "no-cache"){$htmlout} end