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

« back to all changes in this revision

Viewing changes to www/dispatch/html.py

  • Committer: mattgiuca
  • Date: 2008-02-14 00:48:06 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:449
php/phpBB3/cache: Set svn:ignore on all the php files here, since they are
auto-generated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        req.write('  <link rel="stylesheet" type="text/css" href="%s" />\n'
74
74
            % cgi.escape(util.make_path(style)))
75
75
    for script in req.scripts:
76
 
        req.write('  <script type="text/javascript" src="%s" />\n'
 
76
        req.write('  <script type="text/javascript" src="%s"></script>\n'
77
77
            % cgi.escape(util.make_path(script)))
78
78
 
79
79
    req.write("</head>\n\n")
80
80
 
81
81
    # Open the body element and write a bunch of stuff there (the header)
82
82
    req.write("""<body>
83
 
<div id="ivleheader">
 
83
<div id="ivleheader"></div>
 
84
<div id="ivleheader_text">
84
85
  <h1>IVLE</h1>
85
86
  <h2>Informatics Virtual Learning Environment</h2>
86
87
""")
87
88
 
88
89
    if req.username:
89
 
        req.write('  <p class="userhello">Welcome, <span '
90
 
            'class="username">%s</span> |\n'
 
90
        # Get the user's nickname from the request session
 
91
        nickname = req.get_session()['nick']
 
92
        req.write('  <p class="userhello">%s (<span '
 
93
            'class="username">%s</span>) |\n'
91
94
            '    <a href="%s">Help</a> |\n'
92
95
            '    <a href="%s">Logout</a>\n'
93
96
            '  </p>\n' %
94
 
            (cgi.escape(req.username),
 
97
            (cgi.escape(nickname), cgi.escape(req.username),
95
98
             cgi.escape(get_help_url(req)),
96
99
             cgi.escape(util.make_path('logout'))))
97
100
    else:
98
101
        req.write('  <p class="userhello">Not logged in.</p>')
99
102
 
 
103
    # ivleheader_tabs is a separate div, so it can be positioned absolutely
 
104
    req.write('</div>\n<div id="ivleheader_tabs">\n')
 
105
 
100
106
    # If the "debuginfo" app is installed, display a warning to the admin to
101
107
    # make sure it is removed in production.
102
108
    if "debuginfo" in conf.apps.app_url: