aboutsummaryrefslogtreecommitdiff
path: root/log.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-24 00:56:24 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-24 00:56:24 +0100
commitdb4252203f63f77c62acf17e2471ba7e95e5a19d (patch)
tree37f5fe625ba5b98315d044fd6ced4e02dd4b4a8a /log.rb
parent26450dd0e16d33519bf89e7d057bbb400f3793a0 (diff)
validated and make filter persistent
Diffstat (limited to 'log.rb')
-rw-r--r--log.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/log.rb b/log.rb
index 0007dd9..c695763 100644
--- a/log.rb
+++ b/log.rb
@@ -26,9 +26,13 @@ class LogEntry
@timestamp = timestamp
@comment = comment
end
- def to_html(link = true)
+ def to_html(link = true,history = "")
ret = "<tr><td>"
- ret += "<a href='?revision=#{@rev}' >" if link
+ if link
+ ret += "<a href='?revision=#{@rev}"
+ ret += "&history=#{history}" if history != ""
+ ret += "'>"
+ end
ret += "#{@rev}"
ret += "</a>" if link
ret += "</td>"
@@ -101,10 +105,10 @@ class Log
@log << LogEntry.new(revision,timestamp,comment)
@log.sort!
end
- def to_html(notlinkrevision)
- ret = "<table><tr><th>Version</th><th>Date</th><th>Comment</th></tr>"
+ def to_html(unlinkedrevision,history)
+ ret = "<table summary='Historytable' ><tr><th>Version</th><th>Date</th><th>Comment</th></tr>"
self.each do |l|
- ret += l.to_html(notlinkrevision != l.rev)
+ ret += l.to_html(unlinkedrevision != l.rev,history)
end
ret += "</table>"
ret