# $URL$
# $Id$
import paginate
BASEURLJOURNALCOVERS = 'http://drcwww.uvt.nl/~place/elsevier/'
import rating
def renderSingleItem(index, link, metadata, recordId):
record = any.createRecord(metadata)
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:
####### using the complete metadata record instead of only the mods part
if recordId.split(':')[0] in ['opc-uvt-nl']:
metadata = parse(any.getStream(recordId, 'mods'))
else:
metadata = parse(any.getStream(recordId, 'metadata'))
link = 'page/recordview?' + urlencode({
'recordId': recordId})
index += 1
yield renderSingleItem(index, link, metadata, recordId)
yield """
"""
yield paginate.main(offset, total, arguments=arguments, path=path, *args, **kwargs)
yield """
"""