{% 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) }} {% else %} {{ "{:0.2}".format(hits.query_time_ms/1000.0) }} {% endif %} {%- endmacro %} {% block extra_head %} {# among other things, this prevents query parameters from ending up in goatcounter #} {% endblock %} {% block title %} {% if query and query.q %}{{ query.q }} - {% endif %}{{ super() }} {% endblock %} {% 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) }} {{ search_macros.clear_query(query) }}
{% if hits %} {{ "{:,}".format(hits.count_found) }} {% trans trimmed count=hits.count_found %} Hit {% pluralize %} Hits {% endtrans %} {% trans trimmed frac_sec=format_query_time(hits.query_time_ms) %} in {{ frac_sec }}sec {% endtrans %} {% else %}   {% endif %}
{% 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 %}