$def with ()
$ q = query_param('q', '')
$ results = random_author_search()
$var title: $_('Authors')
$_('Authors')
$for doc in results.docs:
$ name = doc['name']
$ work_count = doc['work_count']
$ work_count_str = ungettext("1 book", "%(count)d books", work_count, count=work_count)
$ date = ''
$if 'birth_date' in doc or 'death_date' in doc:
$ date = doc.get('birth_date', '') + ' - ' + doc.get('death_date', '')
$elif 'date' in doc:
$ date = doc['date']
-
$name $date
$work_count_str
$if work_count:
$if 'top_subjects' in doc:
$_('about %(subjects)s', subjects=', '.join(doc['top_subjects'])),
$:_('including %(topwork)s', topwork=doc.get('top_work', ''))