Changeset 7118


Ignore:
Timestamp:
29/06/10 10:28:18 (9 years ago)
Author:
astephen
Message:

more fixes for admin interface

Location:
cows_wps/trunk/cows_wps
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/cows_wps/controllers/admin.py

    r7116 r7118  
    8989        
    9090    def logout(self): 
    91         del request.cookies["wps_ui_admin"] 
     91        response.delete_cookie('wps_ui_admin') 
    9292        return self.login(err_msg = "You have successfully logged out.") 
  • cows_wps/trunk/cows_wps/renderer/ui_renderer.py

    r7115 r7118  
    2121        # Instantiate Genshi template loader 
    2222        self.template_dir = config["wps.template_dir"] 
    23         self.templateLoader = TemplateLoader(self.template_dir, auto_reload=True) 
     23        self.templateLoader = TemplateLoader(self.template_dir, auto_reload = True) 
    2424 
    2525    def _htmlifyItems(self, items): 
     
    4040        """ 
    4141        tmpl_gen = self.templateLoader.load("ui_template.html") 
     42 
    4243        # Make sure items are HTML and won't be escaped 
    4344        items = self._htmlifyItems(items) 
    4445        stream = tmpl_gen.generate(title = title, items = items,  
    4546                        wps_capabilities_url = "/wps?Service=WPS&Request=GetCapabilities&Format=text/xml", 
    46                         admin = admin, bbox_required = bbox_required) 
     47                        bbox_required = bbox_required) 
    4748        return stream.render('xhtml') 
    4849 
     
    7475                 ("Jobs", jobs_html)]   
    7576 
    76         return self.render("Jobs Page", items, admin = admin) 
     77        return self.render("Jobs Page", items)#, admin = admin) 
    7778 
    7879 
  • cows_wps/trunk/cows_wps/templates/ui_template.html

    r7115 r7118  
    100100?>  
    101101 
     102<?python from pylons import request ?> 
     103<?python from cows_wps.utils.common import isAdminLoggedIn 
     104 
     105admin = isAdminLoggedIn(request) 
     106 
     107?> 
     108 
    102109        <py:if test="logged_in"> 
    103110                <?python username = logged_in.getUserName() ?> 
Note: See TracChangeset for help on using the changeset viewer.