{# vim: set ts=2 et sts=2 sw=2: #} {% extends "search/base.html" %} {% set meta = (('WT.oss', q), ('WT.oss_r', num_results)) %} {% set result_fold_limit = 3 %} {% block title %} {% if search_query %} {{ page_title(_('Search Results for "{search_query}"')|f(search_query=search_query)) }} {% else %} {{ page_title(_('Search')) }} {% endif %} {% endblock %} {% block bodyclass %}search-results search-results-no-demo{% endblock %} {% macro doc_block(doc, index) -%} {% set doc_url = '%s%s' % (settings.SITE_URL, url('wiki.document', doc.slug, locale=doc.locale)) %} {% set more_class = 'closed' if index > result_fold_limit and current_page == 1 else '' %}
  • {% endmacro %} {% block content %}
    {% if search_query %}

    {{ _('Results') }}

    {% trans locale_native = settings.LOCALES[request.locale].native %} {{ result_count }} Results for "{{ search_query }}" in {{ locale_native }} {% endtrans %} {% if request.locale != settings.LANGUAGE_CODE %} · {% trans default_locale_native = settings.LOCALES[settings.LANGUAGE_CODE].native %} Search again in {{ default_locale_native }} {% endtrans %} {% endif %} · {{ _('New Search') }}

    {% if result_count %}

    {{ _('Docs') }}

      {% for doc in results %} {{ doc_block(doc, loop.index) }} {% endfor %}
    {% set show_expander = current_page == 1 and result_count > result_fold_limit %}
    {% if show_expander %} {% trans %} View all {{ result_count }} {% endtrans %} {% endif %}
    {% if prev_page %} {{ _('Previous Page') }} {% endif %} {% if next_page %} {{ _('Next Page') }} {% endif %}
    {#

    Demos

    #} {% endif %}
    {% if facet_counts %}

    {{ _('Topics') }}

    {% endif %} {% else %}

    {{ _('Ooops!') }}

    {% trans search_url = url('search') %}

    You didn't provide a search term. Try a new search!

    {% endtrans %}
    {% endif %}
    {% endblock %} {% block js %} {% endblock %}