diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2008-11-17 19:00:30 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2008-11-17 19:00:30 +0100 |
commit | e75a34bc2c2454d582b44e71baf1cd9945a29d1b (patch) | |
tree | 312d4073a5a98cd04dcc602252975d13c669d868 | |
parent | 911b56477925248808aab2e8cd075faeeaefaf48 (diff) |
fixed some bugs coming from last commit
Diffstat (limited to '')
-rw-r--r-- | config.rb | 13 | ||||
-rwxr-xr-x | index.cgi | 17 | ||||
-rw-r--r-- | overview.rb | 13 |
3 files changed, 26 insertions, 17 deletions
@@ -4,4 +4,17 @@ load "bzr.rb" # Change this if the url is not determined correctly SITEURL = "http://#{$cgi.server_name}#{$cgi.script_name.gsub(/[^\/]*$/,"")}" +# add this htmlcode to the startpage +NOTICE = <<CHARSET +<fieldset><legend>--verbose</legend> +<a href="#{SITEURL}src/">Get the sourcecode.</a> +<br /> +Checkout using <a href="http://bazaar-vcs.org/">bazaar</a>: +<br /> +bzr branch #{SITEURL}src/ dudle +<br /> +<a href="mailto:Benjamin_dot_Kellermann@tu-dresden_in_germany?subject=Feedback to dudle">give feedback</a> +</fieldset> +CHARSET + @@ -9,12 +9,12 @@ require "yaml" require "cgi" -load "config.rb" if __FILE__ == $0 $cgi = CGI.new + utfcookie = CGI::Cookie.new("utf", "true") utfcookie.path = "/" if ($cgi.include?("utf") || $cgi.cookies["utf"][0]) && !$cgi.include?("ascii") @@ -47,21 +47,28 @@ else YEARFORWARD = CGI.escapeHTML(">>") end +TYPE = "text/html" +#TYPE = "application/xhtml+xml" +CHARSET = "utf-8" + $htmlout = <<HEAD <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> HEAD -if File.exist?("data.yaml") +if File.exist?("data.yaml") + olddir = File.expand_path(".") + Dir.chdir("..") + load "config.rb" + Dir.chdir(olddir) + load "../participate.rb" else + load "config.rb" load "overview.rb" end -TYPE = "text/html" -#TYPE = "application/xhtml+xml" -CHARSET = "utf-8" $cgi.out("type" => TYPE ,"charset" => CHARSET,"cookie" => utfcookie, "Cache-Control" => "no-cache"){$htmlout} end diff --git a/overview.rb b/overview.rb index 4fb4091..160b98b 100644 --- a/overview.rb +++ b/overview.rb @@ -100,18 +100,7 @@ $htmlout += <<CREATE </fieldset> CREATE -$htmlout += <<CHARSET -<fieldset><legend>--verbose</legend> -<a href="http://dudle.inf.tu-dresden.de/src/">Get the sourcecode.</a> -<br /> -Checkout using <a href="http://bazaar-vcs.org/">bazaar</a>: -<br /> -bzr branch http://dudle.inf.tu-dresden.de/src/ dudle -<br /> -<a href="mailto:Benjamin_dot_Kellermann@tu-dresden_in_germany?subject=Feedback to dudle">give feedback</a> -</fieldset> -CHARSET - +$htmlout += NOTICE $htmlout += "</body></html>" |