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

« back to all changes in this revision

Viewing changes to ivle/webapp/base/xhtml.py

  • Committer: Nick Chadwick
  • Date: 2009-03-10 14:13:53 UTC
  • mto: This revision was merged to the branch mainline in revision 1162.
  • Revision ID: chadnickbok@gmail.com-20090310141353-dsohpcfzni5nshsp
Removed a shebang from rst.py, as it no longer has any real main
function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from ivle.webapp.base.views import BaseView
29
29
from ivle.webapp.base.plugins import ViewPlugin, OverlayPlugin
30
30
from ivle.webapp.errors import HTTPError, Unauthorized
 
31
import ivle.conf
 
32
import ivle.util
31
33
 
32
34
class XHTMLView(BaseView):
33
35
    """
81
83
        ctx['styles'] += req.styles
82
84
 
83
85
        ctx['scripts'] = [media_url(req, CorePlugin, path) for path in
84
 
                           ('util.js', 'json2.js', 'md5.js')]
85
 
        ctx['scripts'].append(media_url(req, '+external/jquery', 'jquery.js'))
 
86
                           ('util.js', 'json2.js', 'md5.js', 'jquery.js')]
86
87
        ctx['scripts'] += req.scripts
87
88
 
88
89
        ctx['scripts_init'] = req.scripts_init
99
100
 
100
101
    def populate_headings(self, req, ctx):
101
102
        ctx['favicon'] = None
102
 
        ctx['root_dir'] = req.config['urls']['root']
103
 
        ctx['public_host'] = req.config['urls']['public_host']
104
 
        ctx['svn_base'] = req.config['urls']['svn_addr']
 
103
        ctx['root_dir'] = ivle.conf.root_dir
 
104
        ctx['public_host'] = ivle.conf.public_host
105
105
        ctx['write_javascript_settings'] = req.write_javascript_settings
106
106
        if req.user:
107
107
            ctx['login'] = req.user.login
134
134
                        ctx['favicon'] = icon_url
135
135
                else:
136
136
                    new_app['has_icon'] = False
137
 
                new_app['path'] = req.make_path(tab[4])
 
137
                new_app['path'] = ivle.util.make_path(tab[4])
138
138
                new_app['desc'] = tab[2]
139
139
                new_app['name'] = tab[1]
140
140
                new_app['weight'] = tab[5]