{% extends "zim/base.html" %} {# :param humanReadableId: Id of the Zim book being searched :param keywords: string search terms :param pagination: pagincation object with page info and items :param suggestions: string or list of alterate spelling suggestions :param endpoint_desc: EndPointDescription for use by pagination #} {% from 'macros/_zim_search.html' import render_pagination, render_zim_search %} {% if keywords %} {% set page_title = _('Search results for "%(keywords)s"', keywords=keywords) %} {% else %} {% set page_title = _('Keywords needed!') %} {% endif %} {% block zim_content %} {% if pagination and pagination.pages > 0 %}
{% trans total=pagination.total_count, keywords=keywords %}{{ total }} found for your search "{{ keywords }}".{% endtrans %}
{{ render_zim_search(humanReadableId, pagination.items, pagination.per_page * (pagination.page - 1), 'table table-striped table-hover') }} {{ 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: