Changeset 3430


Ignore:
Timestamp:
15/02/08 12:10:41 (12 years ago)
Author:
cbyrom
Message:

Adjust displayed tabs; only display Selections tab when Results tab is visible.

Location:
TI05-delivery/ows_framework/trunk/ows_server/ows_server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/discovery.py

    r3421 r3430  
    213213                if len(c.pageTabs)==1:  
    214214                    c.pageTabs.append(('Results',session['results'])) 
     215                    c.pageTabs.append(('Selections', 
     216                                       h.url_for(controller='selectedItems', 
     217                                                 action='index'))) 
    215218                elif c.pageTabs[1][0]!='Results': 
    216219                        c.pageTabs.insert(1,('Results',session['results'])) 
     220                        selectionsNeeded=1 
     221                        for tab in c.pageTabs[0]: 
     222                            if tab == 'Selections': 
     223                                selectionsNeeded=0 
     224                        if selectionsNeeded: 
     225                            c.pageTabs.append(('Selections', 
     226                                       h.url_for(controller='selectedItems', 
     227                                                 action='index'))) 
     228                             
    217229                return render_response('results') 
    218230                 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/lib/base.py

    r3421 r3430  
    8989         
    9090        c.pageTabs=[('Search',g.discoveryURL)] 
    91         if 'results' in session: c.pageTabs.append(('Results',session['results'])) 
     91        if 'results' in session:  
     92            c.pageTabs.append(('Results',session['results'])) 
     93            # make selections tab available once results are shown - to simplify associated business logic 
     94            c.pageTabs.append(('Selections',h.url_for(controller='selectedItems',action='index'))) 
     95             
    9296        if 'lastViewed' in session: c.pageTabs.append(('Display',session['lastViewed'])) 
    9397         
    94         # make selections tab available at all times - to simplify associated business logic 
    95         #if 'selection' in session: 
    96         c.pageTabs.append(('Selections',h.url_for(controller='selectedItems',action='index'))) 
    9798#            c.pageTabs.append(('Visualise',h.url_for(controller='visualise', action='index'))) 
    9899#            c.pageTabs.append(('Download','Blah')) 
Note: See TracChangeset for help on using the changeset viewer.