From bf302820595fad3ab235a6caed617ab669d2849f Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Mon, 25 Oct 2010 14:41:23 +0200 Subject: more clean main page, new example tab --- config_sample.rb | 54 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 21 deletions(-) (limited to 'config_sample.rb') diff --git a/config_sample.rb b/config_sample.rb index 69263c8..a5ea129 100644 --- a/config_sample.rb +++ b/config_sample.rb @@ -52,7 +52,29 @@ BUGREPORTMAIL = "Benjamin.Kellermann@tu-dresden.de" # Send bug reports automatically with the programm “mail” AUTO_SEND_REPORT = false -# Add some Example Polls to the start page +# add the htmlcode in the Variable INDEXNOTICE to the startpage +# Example: displays all available Polls +indexnotice = <Available Polls + + + + +INDEXNOTICE +Dir.glob("*/data.yaml").sort_by{|f| + File.new(f).mtime +}.reverse.collect{|f| f.gsub(/\/data\.yaml$/,'') }.each{|site| + indexnotice += < + + + +INDEXNOTICE +} +indexnotice += "
PollLast change
#{CGI.escapeHTML(site)}#{File.new(site + "/data.yaml").mtime.strftime('%d.%m, %H:%M')}
" +INDEXNOTICE = indexnotice + +# Add some Example Polls to the example page # you may create those using the normal interface # and make them password protected afterwards # .htaccess and .htdigest are deleted after @@ -74,27 +96,17 @@ EXAMPLES = [ } ] -# add the htmlcode in the Variable NOTICE to the startpage +# add the htmlcode in the Variable EXAMPLENOTICE to the startpage # Example: displays all available Polls -notice = <Available Polls - - - - -NOTICE -Dir.glob("*/data.yaml").sort_by{|f| - File.new(f).mtime -}.reverse.collect{|f| f.gsub(/\/data\.yaml$/,'') }.each{|site| - notice += < - - - -NOTICE -} -notice += "
PollLast change
#{CGI.escapeHTML(site)}#{File.new(site + "/data.yaml").mtime.strftime('%d.%m, %H:%M')}
" -NOTICE = notice +examplenotice = <Screencasts +
    +
  1. Register a new user
  2. +
  3. Setup a new poll
  4. +
  5. Participate in a poll
  6. +
+EXAMPLENOTICE +EXAMPLENOTICE = examplenotice # choose a default stylesheet # e.g., "classic.css", "css/foobar.css", ... -- cgit v1.2.3