{% import "search_macros.html" as search_macros %} {% extends "base.html" %} {% macro format_query_time(query_time_ms) -%} {% if query_time_ms >= 10000 %} {{ "{:0.3}".format(hits.query_time_ms/1000.0) }}sec {% else %} {{ "{:0.2}".format(hits.query_time_ms/1000.0) }}sec {% endif %} {%- endmacro %} {% block fullmain %}
{{ search_macros.query_hidden(query.time_options, query.filter_time) }} {{ search_macros.query_hidden(query.type_options, query.filter_type) }} {{ search_macros.query_hidden(query.availability_options, query.filter_availability) }} {{ search_macros.query_hidden(query.sort_options, query.sort_order) }} {% if query.debug %} {% endif %}
{{ _("Filters") }}

{{ search_macros.query_option(query.time_options, query.filter_time) }} {{ search_macros.query_option(query.type_options, query.filter_type) }} {{ search_macros.query_option(query.availability_options, query.filter_availability) }} {{ search_macros.query_option(query.sort_options, query.sort_order) }}

{% if hits %} {{ "{:,}".format(hits.count_found) }} Hits in {{ format_query_time(hits.query_time_ms) }} {% else %}   {% endif %}
{% if hits %}

{{ "{:,}".format(hits.count_found) }}

Hits
in {{ format_query_time(hits.query_time_ms) }}
{% endif %}
{{ search_macros.query_option(query.time_options, query.filter_time) }} {{ search_macros.query_option(query.type_options, query.filter_type) }} {{ search_macros.query_option(query.availability_options, query.filter_availability) }} {{ search_macros.query_option(query.sort_options, query.sort_order) }}
{% if search_error %}
{% if search_error.type == "backend" %} {% trans %}Backend Search Engine Error{% endtrans %} {% elif search_error.type == "query" %} {% trans %}Search Query Error{% endtrans %} {% endif %}

Computer said: {{ search_error.message }}

{% trans trimmed %}Query parsing is currently very naive. Sometimes you can fix this problem by adding quotes around terms or entire phrases.{% endtrans %}

{% elif hits and hits.results %} {% if hits.results %} {% if hits.offset != 0 %}
{{ search_macros.search_pagination(hits) }}
{% endif %} {# search results (rendered via macro) #} {% for paper in hits.results %} {{ search_macros.fulltext_search_result_row(paper, locale=locale, debug_mode=query.debug) }} {% endfor %} {% if hits.count_found > hits.limit %}
{{ search_macros.search_pagination(hits) }}
{% endif %} {% endif %} {% elif hits %}
{% trans %}We didn't find any documents matching your query{% endtrans %}
{% if query.filter_type != "everything" %} {% endif %} {% if query.filter_time and query.filter_time != "all_time" %} {% endif %} {% if query.filter_availability != "everything" %} {% endif %} {{ _("Start Over") }}
{% else %}
{% trans %}Enter a query in the box above to get started{% endtrans %}
{% endif %}
{% endblock %}