diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2011-05-02 15:32:57 +0200 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2011-05-02 15:32:57 +0200 |
commit | 0bd2177cb1708daf68c2f611cbdd5eed5721db3f (patch) | |
tree | 367c5e5fc886e8feee0d23f30c82268fd61e67a5 | |
parent | 13b09ad81d20b21235e870c186893729819080e9 (diff) |
added possibility to add own header/footer
Diffstat (limited to '')
-rw-r--r-- | config_defaults.rb | 6 | ||||
-rw-r--r-- | dudle.rb | 17 |
2 files changed, 11 insertions, 12 deletions
diff --git a/config_defaults.rb b/config_defaults.rb index 650d74e..7acba49 100644 --- a/config_defaults.rb +++ b/config_defaults.rb @@ -37,6 +37,12 @@ end $conf.siteurl = "#{protocol}://#{$cgi.server_name}#{port}#{$cgi.script_name.gsub(/[^\/]*$/,"")}" $conf.breadcrumbs = [] +$conf.header = [] +$conf.footer = [] +6.times{|i| + $conf.header << "<div id='header#{i}'></div>" + $conf.footer << "<div id='footer#{i}'></div>" +} $conf.errorlog = "" $conf.bugreportmail = "Benjamin.Kellermann@tu-dresden.de" @@ -170,11 +170,10 @@ class Dudle @html << <<HEAD <body><div id="top"></div> -<div id='header1'></div> -<div id='header2'></div> -<div id='header3'></div> -<div id='header4'></div> -<div id='header5'></div> +HEAD + $conf.header.each{|h| @html << h } + + @html << <<HEAD #{breadcrumbs} <div id='main'> #{tabs_to_html(@tab)} @@ -251,13 +250,7 @@ READY @html << "</ul></div>" # languageChooser @html << "</div>" # main - @html << <<FOOT -<div id='footer1'></div> -<div id='footer2'></div> -<div id='footer3'></div> -<div id='footer4'></div> -<div id='footer5'></div> -FOOT + $conf.footer.each{|f| @html << f } @extensions.each{|e| if File.exists?("#{@basedir}/extensions/#{e}/main.rb") $current_ext_dir = e |