{% 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 %}

{{ term }}

{% endfor %}

{{ suggestion.string }}

#} {% if suggestion is string %}

{{ suggestion}}

{% else %} {% for sug in suggestion %}

{{ sug }}

{% endfor %} {% endif %} {% endif %} {% trans %}

Suggestions:

{% endtrans %} {% endif %} {% endblock %}