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

« back to all changes in this revision

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

Display the current path as the filebrowser title again. Broke in genshi port.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        # Global template
75
75
        ctx = genshi.template.Context()
76
76
        # XXX: Leave this here!! (Before req.styles is read)
77
 
        ctx['overlays'] = self.render_overlays(req) if req.user else []
 
77
        ctx['overlays'] = self.render_overlays(req)
78
78
 
79
79
        ctx['styles'] = [media_url(req, CorePlugin, 'ivle.css')]
80
80
        ctx['styles'] += req.styles
85
85
 
86
86
        ctx['scripts_init'] = req.scripts_init
87
87
        ctx['app_template'] = app
88
 
        ctx['title_img'] = media_url(req, CorePlugin,
89
 
                                     "images/chrome/title.png")
90
88
        self.populate_headings(req, ctx)
91
89
        tmpl = loader.load(os.path.join(os.path.dirname(__file__), 
92
90
                                                        'ivle-headings.html'))
119
117
            for tab in plugin.tabs:
120
118
                # tab is a tuple: name, title, desc, icon, path
121
119
                new_app = {}
122
 
                new_app['this_app'] = hasattr(self, 'tab') \
123
 
                                      and tab[0] == self.tab
 
120
                new_app['this_app'] = hasattr(self, 'appname') \
 
121
                                      and tab[0] == self.appname
124
122
 
125
123
                # Icon name
126
124
                if tab[3] is not None:
193
191
 
194
192
        if req.user is None:
195
193
            # Not logged in. Redirect to login page.
196
 
            if req.uri == '/':
197
 
                query_string = ''
198
 
            else:
199
 
                query_string = '?url=' + urllib.quote(req.uri, safe="/~")
200
 
            req.throw_redirect('/+login' + query_string)
 
194
            req.throw_redirect('/+login?' + 
 
195
                               urllib.urlencode([('url', req.uri)]))
201
196
 
202
197
        req.status = 403