~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/dispatch/html.py

  • Committer: mattgiuca
  • Date: 2007-12-20 22:46:43 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:106
Renamed "student_dir" to "jail_base" across the suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
<html xmlns="http://www.w3.org/1999/xhtml">
44
44
<head>
45
45
  <title>IVLE%s</title>
46
 
  <meta http-equiv="Content-Type" content="%s; charset=utf-8" />
47
 
  <link rel="stylesheet" type="text/css" href="%s" />
48
 
""" % (titlepart, req.content_type, util.make_path('media/common/ivle.css')))
49
 
 
50
 
    # Write any app-specific style and script links
51
 
    for style in req.styles:
52
 
        req.write('  <link rel="stylesheet" type="text/css" href="%s" />\n'
53
 
            % util.make_path(style))
54
 
    for script in req.scripts:
55
 
        req.write('  <script type="text/javascript" src="%s" />\n'
56
 
            % util.make_path(script))
57
 
 
58
 
    req.write("</head>\n\n")
 
46
  <meta http-equiv="Content-Type"
 
47
    content="%s; charset=utf-8" />
 
48
</head>
 
49
 
 
50
""" % (titlepart, req.content_type))
59
51
 
60
52
    # Open the body element and write a bunch of stuff there (the header)
61
53
    req.write("""<body>
62
54
<h1>IVLE - Informatics Virtual Learning Environment</h1>
63
55
""")
64
56
 
65
 
    if req.username:
66
 
        req.write("""<p>Hello, %s. <a href="%s">Logout</a></p>\n""" %
67
 
            (req.username, util.make_path('logout')))
68
 
    else:
69
 
        req.write("<p>Not logged in.</p>")
70
 
 
71
57
    # If the "debuginfo" app is installed, display a warning to the admin to
72
58
    # make sure it is removed in production.
73
59
    if "debuginfo" in conf.apps.app_url:
74
60
        req.write("<p>Warning: debuginfo is enabled. Remove this app from "
75
 
            "conf.apps.app_url when placed into production.</p>\n")
 
61
            "conf.apps.app_url when placed into production.</p>")
76
62
 
77
63
    print_apps_list(req)
78
64
 
95
81
    for urlname in conf.apps.apps_in_tabs:
96
82
        app = conf.apps.app_url[urlname]
97
83
        file.write('  <li><a href="%s">%s</a></li>\n'
98
 
            % (util.make_path(urlname), app.name))
 
84
            % (util.make_path(app.dir), app.name))
99
85
 
100
86
    file.write('</ul>\n')