# $Id$ # $URL$ import paginate, availability logger = logging.getLogger('meresco.resultlist') logger.debug("Starting logger") serverConfig = configs ['server'] serverConfig.setSection('proxies') websiteConfig = configs ['website'] websiteConfig.setSection('searchform') COVERS_ISSN = serverConfig.get('Covers_ISSN',section='proxies') COVERS_ISBN = serverConfig.get('Covers_ISBN',section='proxies') def renderSingleItem(index, link, recordId): logger.debug('recordId: ' + recordId) record = any.createRecord(recordId) authors='' if 'Author(s)' in record: authors = record['Author(s)'] elif 'Editor(s)' in record: authors = record['Editor(s)'] + ' (Ed.)' source='' if 'Source' in record: source=record['Source'] genre = '' if 'Publication type' in record: genre = record['Publication type'] date='' if 'Publication date' in record: date=record['Publication date'] emptyImage = '/files/' + websiteConfig.get('empty', section='images') coverImage = '' coverUrl = getCoverUrlFor(record) if coverUrl: coverImage =""" """% {'coverUrl':coverUrl,'emptyImage':emptyImage} availabilityLabel = websiteConfig.get('availability',section="availability") recordToggler = """