{# vim: set ts=2 et sts=2 sw=2: #} {% extends "search/base.html" %} {% set meta = (('WT.oss', q), ('WT.oss_r', num_results)) %} {% block title %} {% if search_query %} {{ page_title(_('Search Results for "{search_query}"')|f(search_query=search_query)) }} {% else %} {{ page_title(_('Search')) }} {% endif %} {% endblock %} {% macro doc_block(doc) -%} {% set doc_url = '%s%s' % (settings.SITE_URL, url('wiki.document', doc.slug, locale=doc.locale)) %}
  • {{ doc.title }}

    {% if doc.tags|length %} {% endif %}
    {# #}
    {# |safe here because get_excerpt uses bleach #}

    {{ doc.get_excerpt()|safe }}

  • {% endmacro %} {% block content %}

    {{ _('Search') }}

    {% trans %} We'd like to know how we can improve MDN search. To help us out, please complete this survey.

    {% endtrans %}

    {% if search_query %}
    {% if result_count %}

    {{ _('Search Results For "%s"') % search_query }}

      {% for doc in results %} {{ doc_block(doc) }} {% endfor %}
    {% if next_page %} {{ _('Next Page') }} {% endif %} {% if prev_page %} {{ _('Previous Page') }} {% endif %}
    {% if facet_counts %}

    {{ _('Topics') }}

    {% endif %} {% else %}

    {{ _('Ooops!') }}

    {{ _('No documents relating to your search could be found.') }}

    {% include 'search/popular.html' %} {% endif %} {% else %} {% include 'search/popular.html' %} {% endif %}
    {% endblock %} {% block js %} {% endblock %}