From 110633c45335705980ecf0565c8fc11ca95ceb66 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Mon, 23 Nov 2009 18:02:18 +0100 Subject: Stylesheet settings uses table too --- customize.rb | 59 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) (limited to 'customize.rb') diff --git a/customize.rb b/customize.rb index 5d90a99..da927b7 100755 --- a/customize.rb +++ b/customize.rb @@ -40,45 +40,48 @@ $html << < -

Charset

- +def choosetable(tablesummary, options, cursetting) + ret = < -CHARSET -[["Use normal strings","ascii"], - ["Use special characters (#{UTFCHARS})","utf"]].each{|description,href| - selected = href == (USEUTF ? "utf" : "ascii") - $html << "" - } +HEAD + options.each{|description,href,title| + selected = href == cursetting + ret += "" + } + ret += "
Current Setting Description
" - $html << CROSS if selected - $html << "" - $html << "" unless selected - $html << description - $html << "" unless selected - $html << "
" + ret += CROSS if selected + ret += "" + ret += "" unless selected + ret += description + ret += "" unless selected + ret += "
" + ret +end + + +a = [["Use normal strings","ascii"], + ["Use special characters (#{UTFCHARS})","utf", "Use this options if you see the characters in the parenthesis."]] $html << < +
+

Charset

+#{choosetable("Charset settings",a,USEUTF ? "utf" : "ascii")}
CHARSET -$html << <

Stylesheet

-
    -CHARSET -[["default","dudle.css"], - ["PrimeLife","primelife.css"], - ["TU Dresden","tud.css"]].each{|descr,cssfile| - $html << "
  • #{descr}
  • " -} -$html << < +#{choosetable("Stylesheet settings",a,"css=dudle.css")} -CHARSET +CSS username = $cgi.cookies["username"][0] -- cgit v1.2.3