{% load ppa_tags %} {% comment %} This partial is rendered as part of `digitizedwork_detail.html` and can also be requested asynchronously to repopulate the search results. {% endcomment %} {% if query or page_highlights %} {% if not error %}

{{ current_results.paginator.count }} occurrence{{ current_results.paginator.count|pluralize }}

{% endif %}
{% for page in current_results.object_list %} {% with highlights=page_highlights|dict_item:page.id%}
{% include 'archive/snippets/page_preview.html' with item_id=page.source_id source=object.get_source_display image_id=page.image_id source_url=object.source_url %}
{% endwith %} {% empty %}
{# display error if something went wrong (bad query, etc.) #}

{% firstof error "No matching pages." %}

{% endfor %}
{% endif %} {% if not error and current_results.paginator.count > 5 %} {% endif %}