Changeset 2853


Ignore:
Timestamp:
29/08/07 11:52:25 (12 years ago)
Author:
lawrence
Message:

This a complete fix for ticket:863 (I hope) which includes logic
for handling the pagetabs as a consequence.

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

Legend:

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

    r2804 r2853  
    1818    def addSelection(self,uri,name): 
    1919        if 'selection' not in session: 
     20            newtabs=1 
    2021            session['selection']=[(uri,name),] 
    2122        else: 
     23            newtabs=0 
    2224            rb=Utilities.RingBuffer(10) 
    2325            for i in session['selection']: rb.append(i) 
     
    2628            session['selection']=rb.tolist() 
    2729        session.save() 
    28         return render_response('cart',fragment=True) 
     30        if newtabs: 
     31            c.UpdatePageTabs=1 
     32            c.current='Display' 
     33            c.pageTabs.append(('Selections',h.url_for(controller='selection',action='index'))) 
     34            c.pageTabs.append(('Visualise','Blah')) 
     35            c.pageTabs.append(('Download','Blah')) 
     36        return render_response('ndgPage',fragment=True) 
    2937             
    3038    def clear(self,value): 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/lib/base.py

    r2836 r2853  
    5050        if 'lastViewed' in session: c.pageTabs.append(('Display',session['lastViewed'])) 
    5151         
    52         if 'ndgSec' in session: 
     52        if 'selection' in session: 
    5353            c.pageTabs.append(('Selections',h.url_for(controller='selection',action='index'))) 
    5454            c.pageTabs.append(('Visualise','Blah')) 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/ndgPage.kid

    r2800 r2853  
    9797        <div class="clear"/> 
    9898    </div> 
     99    <py if="c.UpdatePageTabs" py:replace="PageTabs(c.current)"/> 
    99100 
    100101    <!-- History and Shopping Cart follow --> 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/stubB.kid

    r2851 r2853  
    6464                                    <td width="10%"> 
    6565                                        <span class="selectme" py:if="showSelect"> 
    66                                             ${XML(h.link_to_remote("Select",dict(update="Left", 
     66                                            ${XML(h.link_to_remote("Select",dict(update="PageTabs", 
    6767                                            url=h.url_for(controller="tabs", 
    6868                                            action="addSelection",uri=granule.entryID,name=granule.name))))} 
Note: See TracChangeset for help on using the changeset viewer.