aboutsummaryrefslogtreecommitdiff
path: root/pollhead.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-12-09 22:49:01 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-12-09 22:49:01 +0100
commit0e53012e5c656f2a54e8550a7a43e7908862a289 (patch)
treef9a0a3e92f32f012440f9e79eb6668ae6a11c6ea /pollhead.rb
parent4951881f53177c06ebecfd5aca8800fff631c9bf (diff)
hide sortsymbol in print.css
Diffstat (limited to 'pollhead.rb')
-rw-r--r--pollhead.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/pollhead.rb b/pollhead.rb
index 9afd8b3..524631b 100644
--- a/pollhead.rb
+++ b/pollhead.rb
@@ -56,17 +56,19 @@ class PollHead
def to_html(scols, showeditbuttons = false,activecolumn = nil)
def sortsymb(scols,col)
- scols.include?(col) ? SORT : NOSORT
+ return <<SORTSYMBOL
+<span class='sortsymb'> #{scols.include?(col) ? SORT : NOSORT}</span>
+SORTSYMBOL
end
ret = "<tr>"
- ret += "<th><a href='?sort=name'>Name #{sortsymb(scols,"name")}</a></th>\n" unless showeditbuttons
+ ret += "<th><a href='?sort=name'>Name#{sortsymb(scols,"name")}</span></a></th>\n" unless showeditbuttons
@data.sort.each{|columntitle,columndescription|
ret += "<th"
ret += " id='active' " if activecolumn == columntitle
ret += ">"
ret += "<a title=\"#{columndescription}\" href=\"?sort=#{CGI.escapeHTML(CGI.escape(columntitle))}\">" unless showeditbuttons
ret += "#{CGI.escapeHTML(columntitle)}"
- ret += " #{sortsymb(scols,columntitle)}</a>" unless showeditbuttons
+ ret += "#{sortsymb(scols,columntitle)}</a>" unless showeditbuttons
if showeditbuttons
ret += <<EDITDELETE
<div>
@@ -83,7 +85,7 @@ EDITDELETE
end
ret += "</th>"
}
- ret += "<th><a href='?'>Last Edit #{sortsymb(scols,"timestamp")}</a></th>\n" unless showeditbuttons
+ ret += "<th><a href='?'>Last Edit#{sortsymb(scols,"timestamp")}</a></th>\n" unless showeditbuttons
ret += "</tr>\n"
ret
end