Changeset 5134 for ndgCommon


Ignore:
Timestamp:
23/03/09 16:00:56 (10 years ago)
Author:
cbyrom
Message:

Add search functionality for doing searches in 'browse' mode against
the local browse service + add templates to support this - making the
atom search result template more generic for re-use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/clients/xmldb/eXist/searchclient.py

    r4976 r5134  
    131131            # but am unsure of implications elsewhere atm 
    132132            if target == self.ATOM_TARGET: 
     133                 
     134                # NB, the eXist 1.2.5->1.3 upgrade resulted in atom feed entries being 
     135                # created as separate files - so skip these in results sets (they 
     136                # won't have an href attribute) 
     137                if not summary.findtext('href'): 
     138                    continue 
    133139                for key in ['providerID', 'created', 'href', 'subtype']: 
    134140                    t[key] = summary.findtext(key) 
     
    136142                    # adjust href to point to atom editor instead of atom view 
    137143                    if key == 'href' and t[key]: 
    138                         t[key] = t[key].replace('view', 'editAtom') 
     144                        t['editLink'] = t[key].replace('view', 'editAtom') 
    139145                         
    140146                    if key == 'subtype': 
Note: See TracChangeset for help on using the changeset viewer.