From 19409f822c901b4935b07493d741d479fbc119a0 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Mon, 23 Nov 2009 15:58:49 +0100 Subject: started to implement undo, added flatten option --- history.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'history.rb') diff --git a/history.rb b/history.rb index 43c5264..46ab5ec 100755 --- a/history.rb +++ b/history.rb @@ -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 << "

History

" $html << "
" 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 << "
" $html << "" -- cgit v1.2.3