source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/tabs.py @ 3421

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/tabs.py@3421
Revision 3421, 723 bytes checked in by cbyrom, 14 years ago (diff)

Implement 'Selections' tab - a shopping cart type function to
allow the storing of different DIF selections together. Functionality
implemented to allow users to select/unselect DIFs from the results
screen and also to remove them, and remove everything, from the
Selections tab. Also, if KML is available for the DIF, icons are
provided to allow the user to open the file - currently valid for
the GoogleEarth? option but not the ConTerra?. Lastly, checkboxes
are provided - together with a 'select all' one - to allow selection
of multiple DIFs when viewing the associated KML. NB, this latter
functionality is not yet implemented.

Line 
1from ows_server.lib.base import *
2from ows_server.models import Utilities
3
4class TabsController(BaseController):
5   
6    def index(self):
7        # Return a rendered template
8        #   return render_response('/some/template.html')
9        # or, Return a response object
10        return Response('Hello World')
11   
12    def update(self,value):
13       
14        session['panelView']=value
15        session.save()
16        return render_response('cart',fragment=True) 
17           
18    def clear(self,value):
19       
20        if value=='History':
21            session['history']=[]
22        elif value=='Selection':
23            session['selection']=[]
24        session.save()
25        return render_response('cart',fragment=True)
Note: See TracBrowser for help on using the repository browser.