diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-23 16:08:20 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-23 16:08:20 +0100 |
commit | d9626923c0b85f13dca1997883d37d15bf9858e5 (patch) | |
tree | fb3a032baac45837e067ff5688492eb15c318269 | |
parent | 19409f822c901b4935b07493d741d479fbc119a0 (diff) |
distinguish between edit and add action in history
-rw-r--r-- | poll.rb | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -273,12 +273,17 @@ FORM name = "Anonymous ##{maximum + 1}" end htmlname = CGI.escapeHTML(name) - @data.delete(CGI.escapeHTML(olduser)) + action = '' + if @data.delete(CGI.escapeHTML(olduser)) + action = "edited" + else + action = "added" + end @data[htmlname] = {"timestamp" => Time.now } @head.each_columnid{|columnid| @data[htmlname][columnid] = agreed[columnid.to_s] } - store "Participant #{name.strip} edited" + store "Participant #{name.strip} #{action}" end def delete(name) @@ -325,7 +330,7 @@ FORM def edit_column(oldcolumnid, newtitle, cgi) parsedtitle = @head.edit_column(oldcolumnid, newtitle, cgi) - store "Column #{parsedtitle} edited" if parsedtitle + store "Column #{parsedtitle} #{oldcolumnid == "" ? "added" : "edited"}" if parsedtitle end def edit_column_htmlform(activecolumn, revision) |