aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xaccess_control.rb2
-rwxr-xr-xedit_columns.rb2
-rw-r--r--html.rb2
-rw-r--r--log.rb14
-rw-r--r--poll.rb19
-rw-r--r--pollhead.rb2
6 files changed, 25 insertions, 16 deletions
diff --git a/access_control.rb b/access_control.rb
index 4fffec9..c50f08a 100755
--- a/access_control.rb
+++ b/access_control.rb
@@ -125,7 +125,7 @@ $html << <<ACL
<h1>#{POLL}</h1>
<h2>Change Access Control Settings</h2>
<form method='post' action=''>
- <table>
+ <table summary='Access Control settings'>
<tr>
<th>Access to</th><th>Username</th><th>Password</th><th>Password (repeat)</th>
</tr>
diff --git a/edit_columns.rb b/edit_columns.rb
index ff584e7..85eca00 100755
--- a/edit_columns.rb
+++ b/edit_columns.rb
@@ -103,7 +103,7 @@ if urevs.max
when "edited"
title = "Column #{coltitle} edit"
end
- $html << "<table><tr>"
+ $html << "<table summary='Undo/Redo functionallity'><tr>"
unless urevs.size == 1
$html << <<UNDO
<td>
diff --git a/html.rb b/html.rb
index 17baa5e..6f296cd 100644
--- a/html.rb
+++ b/html.rb
@@ -97,7 +97,7 @@ module Dudle
when active_tab
ret += "<li id='active_tab' >&nbsp;#{tab}&nbsp;</li> "
when ""
- ret += "<li class='separator_tab'></li>"
+ ret += "<li class='separator_tab' />"
else
ret += "<li class='nonactive_tab' ><a href='#{file}'>&nbsp;#{tab}&nbsp;</a></li> "
end
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
diff --git a/poll.rb b/poll.rb
index 8da05aa..b74bf08 100644
--- a/poll.rb
+++ b/poll.rb
@@ -61,7 +61,7 @@ class Poll
end
def to_html(edituser, showparticipation = true)
- ret = "<table border='1'>\n"
+ ret = "<table border='1' summary='Main Poll table'>\n"
ret += @head.to_html
sort_data($cgi.include?("sort") ? $cgi.params["sort"] : ["timestamp"]).each{|participant,poll|
@@ -154,7 +154,7 @@ class Poll
value=\"#{edituser}\"/>"
ret += "</td>\n"
@head.each_column{|columnid,columntitle|
- ret += "<td class='checkboxes'><table class='checkboxes'>"
+ ret += "<td class='checkboxes'><table summary='Input for one column' class='checkboxes'>"
[[YES, YESVAL],[NO, NOVAL],[MAYBE, MAYBEVAL]].each{|valhuman, valbinary|
ret += "<tr class='input-#{valbinary}'>
<td class='input-#{valbinary}'>
@@ -232,15 +232,20 @@ ADDCOMMENT
ret = <<FORM
<form method='get' action=''>
<div>
+ Show only history items concerning:
<select name='history'>
FORM
- ["", "comments","participants","columns"].each{|opt|
- ret += "<option value='#{opt}' #{selected == opt ? "selected='selected'" : ""} >#{opt}</option>"
+ [["",""],
+ ["participants","Participants"],
+ ["columns","Columns"],
+ ["comments","Comments"]
+ ].each{|value,opt|
+ ret += "<option value='#{value}' #{selected == value ? "selected='selected'" : ""} >#{opt}</option>"
}
+ ret += "</select>"
ret += "<input type='hidden' name='revision' value='#{revision}' />" if revision
ret += <<FORM
- </select>
- <input type='submit' />
+ <input type='submit' value='Filter' />
</div>
</form>
FORM
@@ -262,7 +267,7 @@ FORM
end
log = log.comment_matches(match)
end
- log.around_rev(middlerevision,11).to_html(middlerevision)
+ log.around_rev(middlerevision,11).to_html(middlerevision,only)
end
def add_participant(olduser, name, agreed)
diff --git a/pollhead.rb b/pollhead.rb
index d3aa14c..1519efd 100644
--- a/pollhead.rb
+++ b/pollhead.rb
@@ -125,7 +125,7 @@ EDITDELETE
</div>
</form>
<fieldset><legend>Preview</legend>
-<table>
+<table summary='Preview poll head'>
#{to_html(true,activecolumn)}
</table>
</fieldset>