class TaskJuggler::WelcomePage

Public Class Methods

get_instance(config, options) click to toggle source
# File lib/taskjuggler/daemon/WelcomePage.rb, line 27
def self.get_instance(config, options)
  self.new(config, *options)
end
new(config, *options) click to toggle source
Calls superclass method
# File lib/taskjuggler/daemon/WelcomePage.rb, line 23
def initialize(config, *options)
  super
end

Public Instance Methods

do_GET(req, res) click to toggle source
# File lib/taskjuggler/daemon/WelcomePage.rb, line 31
def do_GET(req, res)
  @req = req
  @res = res
  begin
    generateWelcomePage
  #rescue
  end
end

Private Instance Methods

generateWelcomePage() click to toggle source
# File lib/taskjuggler/daemon/WelcomePage.rb, line 42
    def generateWelcomePage()
      text = <<"EOT"
== Welcome to TaskJuggler ==
----

This is the welcome page of your TaskJuggler built-in web server.
To access your loaded TaskJuggler projects, click [/taskjuggler here].

If you are seeing this page instead of the site you expected, please contact
the administrator of the site involved. Try sending mail to
<webmaster@domain>.

Although this site is running the TaskJuggler software it almost certainly has
no other connection to the TaskJuggler project, so please do not send mail
about this site or its contents to the TaskJuggler authors. If you do, your
message will be ignored.

You can use the following links to learn more about TaskJuggler:

* [#{AppConfig.contact} The TaskJuggler web site]
* [#{AppConfig.contact+ "/tj3/manual/index.html"} User Manual]

----
#{AppConfig.softwareName} v#{AppConfig.version}
- Copyright (c) #{AppConfig.copyright.join(', ')}
by #{AppConfig.authors.join(', ')}
EOT

      rt = RichText.new(text)
      rti = rt.generateIntermediateFormat
      rti.sectionNumbers = false
      page = HTMLDocument.new
      page.generateHead("Welcome to TaskJuggler")
      page.html << rti.to_html
      @res['content-type'] = 'text/html'
      @res.body = page.to_s
    end