Ignore:
Timestamp:
19/06/07 21:42:00 (12 years ago)
Author:
lawrence
Message:

Further modifications to the ows stack to get the retrieve
document working ... (with css)

Location:
TI05-delivery/ows_framework/trunk/ows_server/ows_server
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/middleware.py

    r2615 r2616  
    4747    # handling middleware underneath 
    4848 
    49     app = ndgMiddleware(app) 
     49    app = ndgMiddleware(app,g) 
     50    g=app.globals 
     51     
    5052 
    5153    # Configure logging 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/ndgMiddleware.py

    r2615 r2616  
    55class ndgMiddleware: 
    66     
    7     def __init__(self,app): 
     7    def __init__(self,app,g): 
    88         
    99        #this is the next application in the wsgi stack 
     
    1212        #set up the ndg configuration file 
    1313        cf=CONFIG.get('configfile') 
    14         self.config=myConfig(cf) 
     14        cf=myConfig(cf) 
     15       
     16        self.globals=g 
     17        self.globals.localLink=cf.get('layout','localLink',None) 
     18        self.globals.localImage=cf.get('layout','localImage',None) 
     19        self.globals.localAlt=cf.get('layout','localAlt','Visit Local Site') 
     20        self.globals.ndgLink=cf.get('layout','ndgLink','http://ndg.nerc.ac.uk') 
     21        self.globals.ndgImage=cf.get('layout','ndgImage',None) 
     22        self.globals.ndgAlt=cf.get('layout','ndgAlt','Visit NDG') 
     23        self.globals.PageLogo=cf.get('layout','pageLogo',None) 
     24        self.config=cf 
     25         
    1526         
    1627    def __call__(self,environ,start_response): 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/retrieve.py

    r2615 r2616  
    3636        if status: return Response(status) 
    3737        status,xml=self.__getit() 
    38         return Response(xml) 
    3938        if status: 
    4039            inputs=dict(parse_querystring(request.environ)) 
     
    4342                    x=xmlHandler.xmlHandler(xml,string=1) 
    4443                    xml=x.html 
    45             return Response(xml) 
     44            c.xml=xml 
     45            c.title='Viewing [%s]'%self.uri 
     46            c.login='Not implemented' 
     47            return render_response('content') 
    4648        else: 
    4749            return Response(xml) 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/lib/app_globals.py

    r2615 r2616  
    2626             
    2727        """ 
     28         
     29         
     30         
    2831 
    2932         
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/public/layout/ndg.css

    r2615 r2616  
    1 @import url(/layout/xml.css); 
    2 @import url(/layout/metadata.css); 
    31 
    42 
     3/* The following is the css associated with pretty printing xml */ 
     4DIV.xmlElem {PADDING-LEFT: 20px;} 
     5.xmlAttrVal {COLOR:Red; } 
     6.xmlAttrTyp {COLOR:Green; } 
     7.xmlElemTag {COLOR:Blue; } 
     8.highlight {BACKGROUND-COLOR:Yellow; } 
     9.ndgem {FONT-WEIGHT: bold} 
     10 
     11/* This is the "metadata" css */ 
    512DIV.metadata {PADDING-LEFT: 20px;} 
    613.title {FONT-WEIGHT:bold; FONT-SIZE:140%; FONT-STYLE:italic; } 
     
    2431     
    2532 
    26  
     33/* and the layout css follows */ 
    2734BODY { 
    2835        PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-SIZE: 75%; BACKGROUND: #fff; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; FONT-FAMILY: arial, tahoma, verdana, sans-serif;  
Note: See TracChangeset for help on using the changeset viewer.