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

« back to all changes in this revision

Viewing changes to ivle/dispatch/html.py

  • Committer: matt.giuca
  • Date: 2009-01-19 10:34:45 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1169
Changed svn:ignore on trunk - no longer need to ignore bin or svn directories
    (bin is in repo, svn is gone).
Added .bzrignore, for Bazaar branches of this repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    # Write inline JavaScript which gives the client code access to certain
55
55
    # server-side variables.
56
56
    if req.user:
57
 
        username = '"%s"' % req.user.login
 
57
        username = repr(req.user.login)
58
58
    else:
59
59
        username = "null"
60
60
    if req.write_javascript_settings:
61
61
        req.write("""  <script type="text/javascript">
62
 
    root_dir = "%s";
63
 
    public_host = "%s";
 
62
    root_dir = %s;
 
63
    public_host = %s;
64
64
    username = %s;
65
65
  </script>
66
 
""" % (ivle.conf.root_dir, ivle.conf.public_host, username))
 
66
""" % (repr(ivle.conf.root_dir), repr(ivle.conf.public_host), username))
67
67
    iconurl = get_icon_url(req.app, small=True)
68
68
    if iconurl:
69
69
        req.write("""  <link rel="shortcut icon" href="%s" />
106
106
            '    <a href="%s">Sign out</a>\n'
107
107
            '  </p>\n' %
108
108
            (cgi.escape(nickname), cgi.escape(req.user.login),
109
 
             cgi.escape(util.make_path(
110
 
                        os.path.join('~' + req.user.login, '+settings'))),
 
109
             cgi.escape(util.make_path('settings')),
111
110
             cgi.escape(get_help_url(req)),
112
111
             cgi.escape(util.make_path('logout'))))
113
112
    else: