<%! from lonote.im3 import Book, Paper %> <%def name="result_item(hit)"> <% book = bs[hit['bid']] parent_name = None try: parent_name = book.paper(bs[hit['bid']].pid_parent(hit['pid'])).name except: pass %> ${hit['pname'] | h} % if hit['pdesc']:  ${hit['pdesc'] | h} % endif

% if hit['sid'] == Paper.default_sid: ${hit['sid'] | h} % else: ${hit['sid'] | h} % endif    ${parent_name}   ${hit['bid']}

${hit.highlights('text')}

${_('Search Results of [ {} ]:').format(key)} ${results.scored_length()} / ${len(results)} / ${doc_count}