# $URL$ # $Id$ import paginate BASEURLJOURNALCOVERS = 'http://drcwww.uvt.nl/~place/elsevier/' import rating def renderSingleItem(index, link, recordId): record = any.createRecord(recordId) yield '' yield '%s.' % index if 'Publication type' in record: genre = record['Publication type'] else: genre = '' if 'Abstract' in record: abstract = record['Abstract'] else: abstract = '' yield '%s' % genre yield '%s' % ( link, record['Title'] ) if 'Publication date' in record: date=record['Publication date'] else: date='' if 'Author(s)' in record: authors = record['Author(s)'] elif 'Editor(s)' in record: authors = record['Editor(s)'] + ' (Ed.)' else: authors='' yield '%s' % date yield '%s' % authors ### no ratings yield ' """ mods = any.getMods(recordId) locator = any.createOpenURL(mods) coverUrl = getCoverUrlFor(record) if coverUrl: yield '' %coverUrl else: yield '' if 'Source' in record: source=record['Source'] else: source='' yield '%s' %source id = 'td' + str(index) yield """ """ % {'id' : id} if 'URL(s)' in record: for url in record['URL(s)']: yield '* full text
' %(url) yield """ """ % {'locator' : locator, 'id' : id } yield '
' % index yield '
' % (index,index) yield '' def getCoverUrlFor(record): if 'ISSN' in record: return '%s/%s.gif' % (BASEURLJOURNALCOVERS, record['ISSN']) if 'ISBN' in record: return 'http://syndetics.com/index.aspx?isbn=%s/sc.gif&client=univantilburg' % record['ISBN'] def main(total=0, recordIds=[], bitMatrixRow=[], duration=0, cqlQuery=None, httpQuery='', arguments={}, path='', *args, **kwargs): language = path.startswith('/en/') and 'en' or 'nl' offset = int(arguments.get('offset', ['0'])[0]) lo, hi = offset + 1, min(offset + len(recordIds), total) yield """
""" yield {'nl':'Resultaten %s - %s van %d (%.5s seconden).', 'en': 'Results %s - %s of %d (%.5s seconds).'}[language] % (lo, hi, total, duration) yield """
""" yield paginate.main(offset, total, arguments=arguments, path=path, *args, **kwargs) yield """
""" index = offset for recordId in recordIds: link = 'page/recordview?' + urlencode({ 'recordId': recordId}) index += 1 yield renderSingleItem(index, link, recordId) yield """
""" yield paginate.main(offset, total, arguments=arguments, path=path, *args, **kwargs) yield """
"""