Changeset 0492ba in indico


Ignore:
Timestamp:
03/14/11 16:40:46 (2 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
d0e066
Parents:
336214
Message:

[IMP] Adapted invenioSEA to new invenio layout

Location:
indico/MaKaC/search
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/search/base.py

    rbdd862 r0492ba  
    107107    def create(cls, id, title, location, startDate, materials, authors, description): 
    108108         
    109         regexp = r'^INDICO\.\w(\w+)(\.(\w+)(\.(\w)+)?)?$' 
     109        regexp = r'^INDICO\.(\w+)(\.(\w+)(\.(\w)+)?)?$' 
    110110 
    111111        m = re.match(regexp, str(id)) 
     
    129129 
    130130        self._parent = parent 
    131  
    132         materials.append((urlHandlers.UHConferenceDisplay.getURL(confId=parent), 'Event details')) 
    133131 
    134132    def getConferenceId(self): 
  • indico/MaKaC/search/invenioSEA.py

    rbdd862 r0492ba  
    160160 
    161161            # search for event identifier 
    162             self._marcQuery = 'AND (970__:"INDICO.p%s*" OR 970__:"INDICO.r%s*")' % (target.getId(), target.getId()) 
     162            self._marcQuery = 'AND 970__:"INDICO.%s*"' % (target.getId(), target.getId()) 
    163163            self._searchCategories = False 
    164164 
     
    220220        return field 
    221221 
    222     @SEATranslator ('collections',[],'c') 
     222    @SEATranslator ('collections',[],('c', 'p')) 
    223223    def translateCollection(self, collection): 
    224224 
     225        if collection == 'Events': 
     226            query = "AND 65027a:'*'" 
     227        else: 
     228            query = "AND 65027a:" 
     229 
    225230        if self._private: 
    226             repository = 'INDICOSEARCH' 
    227         else: 
    228             repository = 'INDICOPUBLIC' 
    229  
    230         if collection == 'Events': 
    231             return '%s.events' % repository 
    232         elif collection == 'Contributions': 
    233             return '%s.contribs' % repository 
     231            return ('INDICOSEARCH', query) 
     232        else: 
     233            return ('INDICOSEARCH.PUBLIC', query) 
     234 
    234235 
    235236    @SEATranslator ('startRecord',[],'jrec') 
Note: See TracChangeset for help on using the changeset viewer.