diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-23 15:58:49 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-23 15:58:49 +0100 |
commit | 19409f822c901b4935b07493d741d479fbc119a0 (patch) | |
tree | c971ca940ebf21d0fe103a1be9276e88f85396f3 /history.rb | |
parent | fc936f76f65db94469959883c8ef2926ff0e779b (diff) |
started to implement undo, added flatten option
Diffstat (limited to '')
-rwxr-xr-x | history.rb | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -33,13 +33,12 @@ require "poll" load "config.rb" Dir.chdir(olddir) -maxrev = VCS.revno if $cgi.include?("revision") revno=$cgi["revision"].to_i versiontitle = "Poll of Version #{revno}" table = YAML::load(VCS.cat(revno, "data.yaml")) else - revno = maxrev + revno = VCS.revno versiontitle = "Current Poll" table = YAML::load_file("data.yaml") end @@ -65,8 +64,8 @@ $html << table.to_html("",false) $html << "<h2>History</h2>" $html << "<div id='history'>" historyselect = $cgi.include?("history") ? $cgi["history"] : nil -$html << table.history_selectform(revno == maxrev ? nil : revno, historyselect) -$html << table.history_to_html(maxrev, revno, historyselect) +$html << table.history_selectform($cgi.include?("revision") ? nil : revno, historyselect) +$html << table.history_to_html(revno, historyselect) $html << "</div>" $html << "</div></body>" |