{% extends 'aristotle_mdr/base.html' %} {% load i18n util_tags %} {% load humanize %} {% load bootstrap3 %} {% load static from staticfiles %} {% load aristotle_tags aristotle_search_tags %} {% load render_bundle from webpack_loader %} {% block webpack_css_bundle %} {% render_bundle 'search' 'css' %} {% endblock %} {% block webpack_bundle %} {% render_bundle 'search' 'js' %} {% endblock %} {% block header %} {% include 'aristotle_mdr/header.html' with hide_search=True %} {% endblock %} {% block extra_head_scripts %} {{ category_map|json_script:"search-category-map" }} {% endblock %} {% block title %}{% trans "Search" %}{% if query %} {% trans "results" context 'Search results' %} - {{ query }}{% endif %}{% endblock %} {% block content %}
{# open main_search_form #}
{% if user.is_active %} {% comment %} Only logged in users have workgroups. If you aren't logged in you can *only* see public items. {% endcomment %} {% endif %} Advanced help
{{ form.rpp.as_hidden }}
{# close main_search_form for when results #}
{% if form.errors %}

There were one or more error with your search selections, please correct them and try again.

{% endif %}
{% if query or form.filter_search %}

Results

{% if form.auto_broaden_search %} {% endif %}
{% if form.applied_filters %}
Showing only items where {% search_describe_filters form %}
{% endif %}

{% if page.has_other_pages %} Showing {{ page.start_index }} - {{ page.end_index }} of {{ page.paginator.count }} results. {% else %} Showing {{ page.paginator.count }} results. {% endif %}

{# ----- If there are spelling suggestions, show them. ----- #} {% if form.auto_correct_spell_search or form.has_spelling_suggestions %} {% if form.auto_correct_spell_search %}
{% if page.object_list %}

No results for: {{ form.original_query }}

Searching instead for: {% for word,suggestion in form.spelling_suggestions %} {% if suggestion %} {{ suggestion }} {% else %} {{ word }} {% endif %} {% endfor %} {% else %}

No results for: {{ form.original_query }}

Tried searching instead for: {% for word,suggestion in form.spelling_suggestions %} {% if suggestion %} {{ suggestion }} {% else %} {{ word }} {% endif %} {% endfor %}, but no results were found. {% endif %}
{# closes div#spelling #} {% elif form.has_spelling_suggestions %} Did you mean: {% for word,suggestion in form.spelling_suggestions %} {% if suggestion %} {{ suggestion }} {% else %} {{ word }} {% endif %} {% endfor %} {% endif %} {% endif %}
{% endif %}
{# ----- MAIN RESULTS PAGE STARTS HERE ----- #} {% if query or form.filter_search %} {% if page.object_list %}
{# open main_search_form #}
Refine your results
{% if form.facets.fields.facet_model_ct %}
Item types
{% for id, item in form.facets.fields.facet_model_ct.items %}
{{ item.0|title }} ({{ item.1 }})
{% endfor %} {% endif %} {% if form.facets.fields.registrationAuthorities %}
Registration Authorities
{% for id, item in form.facets.fields.registrationAuthorities.items %}
{{ item.0 }} ({{ item.1 }})
{% endfor %} {% endif %} {% if form.facets.fields.stewardship_organisation %}
Stewardship Organisation
{% for id, item in form.facets.fields.stewardship_organisation.items %}
{{ item.0 }} ({{ item.1 }})
{% endfor %} {% endif %} {% comment %} {% if form.facets.fields.facet_model_ct %}
Item types
{% for f in form.facets.fields.facet_model_ct %}
{% with ct='ct'|get_item_from_facet:f.0 %} {{ ct.name|title }} ({{ f.1 }}) {% endwith %}
{% endfor %} {% endif %} {% if form.facets.fields.registrationAuthorities %}
Registration Authorities
{% for f in form.facets.fields.registrationAuthorities %}
{% with ra='ra'|get_item_from_facet:f.0 %} {% if ra %} {{ ra.name }} ({{ f.1 }}) {% else %} {% endif %} {% endwith %}
{% endfor %} {% endif %} {% if form.facets.fields.stewardship_organisation %}
Stewardship Organisation
{% for f in form.facets.fields.stewardship_organisation %}
{% with sa='sa'|get_item_from_facet:f.0 %} {% if sa %} {{ sa.name }} ({{ f.1 }}) {% else %} {% endif %} {% endwith %}
{% endfor %} {% endif %} {% endcomment %} {% if request.user.is_active and form.facets.fields.restriction %}
Restriction
{% for f in form.facets.fields.restriction %}
{{ f.0|restriction_to_text }}{{f.o}} ({{ f.1 }})
{% endfor %} {% endif %} {% if form.facets.fields.statuses %}
Status
{% for f in form.facets.fields.statuses %}
{{ f.0|search_state_to_text }} ({{ f.1 }})
{% endfor %} {% endif %} {% if request.user.is_active and form.facets.fields.workgroup %}
Workgroup
{% for id, item in form.facets.fields.workgroup.items %}
{{ item.0 }} ({{ item.1 }})
{% endfor %} {% endif %} {% for field,details in form.extra_facet_fields %} {% if details.values|length > 1 or details.details.applied %}
{{details.details.title}}
{% if details.values|length > 1 %}
{% if details.details.allow_search %} {% endif %}
{% endif %} {% if details.details.applied %}
{# Active facets #}
{% endif %} {% for f,count in details.values %} {% if f %}
{% facet_display details.details f %} ({{ count }})
{% endif %} {% endfor %} {% endif %} {% endfor %}
{# End facet sidebar #} {# Begin main search results #}
{% csrf_token %}
    {% for result in page.object_list %} {% if result %}
  1. {% if result.rendered_badge %} {{ result.rendered_badge|safe }} {% if result.pk in favourites %} {% endif %} {% else %}
    {% endif %}
    {{ result.rendered_search_result|safe }} {% if result|is_concept %} {% if result.pk in recently_viewed.keys %} {% with stats=recently_viewed|get_item:result.pk %} You've viewed this item {% if stats.count > 9 %} many times {% else %} {{stats.count}} time{{stats.count|pluralize}} {% endif %} in the last month. Last visit: {{stats.last_viewed}} {% endwith %} {% endif %} {% endif %}
  2. {% endif %} {% empty %}
  3. No results found.
  4. {% endfor %}
{% include "aristotle_mdr/helpers/list_action_bar.html" with wrap=True %}
{% include "aristotle_mdr/helpers/paginator.html" with page=page %}
{% for value in rpp_values %} {% if forloop.first %} Results per page: {% else %} {% endif %} {% endfor %}
{% else %}

No results found.

{% if form.auto_broaden_search %} {% endif %} {% if form.attempted_filter_search %} {% endif %} {% endif %} {% elif form.errors %} {% else %} {# Show some example queries to run, maybe query syntax, something else? #}

Enter a query above to search the registry.

{% endif %}
{% bootstrap_modal 'search_concept_help' %} {% endblock %}