diff options
-rwxr-xr-x | authorization_required.cgi | 5 | ||||
-rw-r--r-- | config_sample.rb | 4 | ||||
-rw-r--r-- | dudle.rb | 4 | ||||
-rwxr-xr-x | error.cgi | 5 | ||||
-rwxr-xr-x | not_found.cgi | 5 |
5 files changed, 18 insertions, 5 deletions
diff --git a/authorization_required.cgi b/authorization_required.cgi index 9d2303a..7f2ff4b 100755 --- a/authorization_required.cgi +++ b/authorization_required.cgi @@ -41,10 +41,13 @@ else GetText.bindtextdomain("dudle",:path => "./locale/") title = _("Authorization Required") $h = HTML.new(title) - $h.add_css("/default.css","default",true) + $h.add_css("/#{DEFAULT_CSS}","default",true) returnstr = _("Return to dudle home and Schedule a new Poll") authstr = _("You have to authorize in order to request this page!") $h << <<END + <div id='header1'></div> + <div id='header2'></div> + <div id='header3'></div> <div id='main'> <div id='content'> <h1>#{title}</h1> diff --git a/config_sample.rb b/config_sample.rb index aac1ff8..0441d8c 100644 --- a/config_sample.rb +++ b/config_sample.rb @@ -79,3 +79,7 @@ NOTICE } notice += "</table>" NOTICE = notice + +# choose a default stylesheet +# e.g., "classic.css", "css/foobar.css", ... +DEFAULT_CSS = "default.css" @@ -137,10 +137,10 @@ class Dudle } if $cgi.include?("css") @user_css = $cgi["css"] - @html.add_cookie("css",@user_css,"/",Time.now + (1*60*60*24*365 * (@user_css == "default.css" ? -1 : 1 ))) + @html.add_cookie("css",@user_css,"/",Time.now + (1*60*60*24*365 * (@user_css == DEFAULT_CSS ? -1 : 1 ))) else @user_css = $cgi.cookies["css"][0] - @user_css ||= "default.css" + @user_css ||= DEFAULT_CSS end if $cgi.user_agent =~ /.*MSIE [567]\..*/ @@ -35,8 +35,11 @@ require "html" title = _("Error") $h = HTML.new(title) -$h.add_css("/default.css","default",true) +$h.add_css("/#{DEFAULT_CSS}","default",true) $h << <<END +<div id='header1'></div> +<div id='header2'></div> +<div id='header3'></div> <div id='main'> <div id='content'> <h1>#{title}</h1> diff --git a/not_found.cgi b/not_found.cgi index a75febe..a22d081 100755 --- a/not_found.cgi +++ b/not_found.cgi @@ -25,7 +25,7 @@ GetText.bindtextdomain("dudle",:path => "./locale/") title = _("Poll Not Found") $h = HTML.new(title) -$h.add_css("/default.css","default",true) +$h.add_css("/#{DEFAULT_CSS}","default",true) str = [_("The requested Poll was not found."), _("There are several reasons, why a Poll is deleted:"), _("Somebody klicked on “Delete Poll” and deleted the poll manually."), @@ -34,6 +34,9 @@ str = [_("The requested Poll was not found."), _("Return to dudle home and Schedule a new Poll")] $h << <<END +<div id='header1'></div> +<div id='header2'></div> +<div id='header3'></div> <div id='main'> <div id='content'> <h1>#{title}</h1> |