aboutsummaryrefslogtreecommitdiff
path: root/history.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-20 10:31:24 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-20 10:31:24 +0100
commit47988b9d4bccb0b6145e1d2cf7462879576f6521 (patch)
treeecef7de7aaf995f544a3e711524c36ac1a2bfe46 /history.rb
parentc3d97c3944186d3ad08bcd50b496f3e64ebd8c3b (diff)
changed interface to many tabs
Diffstat (limited to '')
-rwxr-xr-xhistory.rb49
1 files changed, 49 insertions, 0 deletions
diff --git a/history.rb b/history.rb
new file mode 100755
index 0000000..88fd0ee
--- /dev/null
+++ b/history.rb
@@ -0,0 +1,49 @@
+#!/usr/bin/env ruby
+
+################################
+# Author: Benjamin Kellermann #
+# License: CC-by-sa 3.0 #
+# see License #
+################################
+
+require "cgi"
+require "yaml"
+
+if __FILE__ == $0
+
+$cgi = CGI.new
+
+olddir = File.expand_path(".")
+Dir.chdir("..")
+require "html"
+require "poll"
+load "config.rb"
+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")
+end
+
+$html = HTML.new("dudle - #{table.name} - History")
+$html.header["Cache-Control"] = "no-cache"
+load "../charset.rb"
+$html.add_css("../dudle.css")
+
+$html << "<body>"
+$html << Dudle::tabs("Access Control")
+
+$html << <<TABLE
+ <div id='main'>
+ <h1>History</h1>
+TABLE
+
+
+$html << "<p id='history'>history:#{table.history_to_html}</p>"
+$html << table.to_html
+$html << "</div></body>"
+
+$html.out($cgi)
+end