{# :param keywords: string search terms :param pagination: pagincation object with page info and items :param suggestions: string or list of alterate spelling suggestions :param fn_author_to_query: function that accepts an author string and returns a query string to search for the author :param endpoint_desc: EndPointDescription for use by pagination :param files_exist: function to check if etext files exist #} {% from 'macros/_misc.html' import render_pagination, render_book_search_table %} {% extends 'layouts/base_navsearch.html' %} {% if keywords %} {% set page_title = _('Search results for "%(keywords)s"', keywords=keywords) %} {% else %} {% set page_title = _('Keywords needed!') %} {% endif %} {% block body %} {% if pagination and pagination.pages > 0 %}
{% trans total=pagination.total, keywords=keywords %}{{ total }} found for your search "{{ keywords }}".{% endtrans %}
{{ render_book_search_table(pagination.items, pagination.per_page * (pagination.page - 1), fn_author_to_query, 'table table-striped table-hover', files_exist) }} {{ render_pagination(pagination, endpoint_desc, query=keywords) }} {% else %}{% trans keywords=keywords %}Sorry, Nothing found for your search "{{ keywords }}".{% endtrans %}
{% if suggestion %}{% trans %}Did you mean?{% endtrans %}
{# {% for term in suggestion %} {% endfor %} #} {% if suggestion is string %} {% else %} {% for sug in suggestion %} {% endfor %} {% endif %} {% endif %} {% trans %}Suggestions: