{% from "_macros.html" import media_pill, cover_url, availability_pill %} {% from "_partials/empty_state.html" import empty_state %} {% set works = page.works if page else [] %} {% set avail = page.availability if page else {} %} {% if not works %} {% if q %} {% if field | default('all') == 'all' %} {{ empty_state('No results for "' ~ q ~ '"', 'The all-fields search matches whole words only. For partial words, try a specific field like Title or Author.') }} {% else %} {{ empty_state('No results for "' ~ q ~ '"', "Try a broader search or a different field.") }} {% endif %} {% elif user | default(none) and has_permission(user, 'item.create') %} {{ empty_state("No works in catalog yet", "Add items to start building your collection.", cta_href="/ui/items/new", cta_label="Add a work") }} {% else %} {{ empty_state("No works in catalog yet", "Check back soon — the collection is still growing.") }} {% endif %} {% else %} {% if page %}
{{ page.total }} result{{ 's' if page.total != 1 else '' }}{% if page.total > page.page_size %} — page {{ page.page }} of {{ ((page.total - 1) // page.page_size) + 1 }}{% endif %}
{% endif %} {% if page and (page.has_prev or page.has_next) %} {% endif %} {% endif %}