$def with (results, fulltext=False)
$ _ = i18n.get_namespace('/search')
$for b in results:
$if fulltext:
$ book = b[0]
$ ocaid = b[1]
$ pages = b[2]
$else:
$ book = b
$ ocaid = None
-
$ olid = book.key.split('/')[-1]
$ title = book.title
$book.title_prefix $title
$if book.get('authors', None):
$_.by
$ authorlist = ', '.join([thingrepr(author).rstrip() for author in book.authors])
$:authorlist
$if book.publishers:
$(', '.join(book.publishers)), $book.publish_date
$else:
$book.publish_date
$book.physical_format.replace('[', '').replace(']','')
$if fulltext:
Pages:
$if len(pages)==0: Unknown
$ a = []
$for pn, pg in pages:
$ a.append('%s'% (book.ocaid, pn-1, pg))
$:(', '.join(a))
$if book.ocaid:
Read