add "no results" message in search

This commit is contained in:
krmax44 2022-03-14 16:26:00 +01:00
parent c27a0aee93
commit 20fe00e8f7
No known key found for this signature in database
GPG key ID: 5C499A4F4EC4EE03
2 changed files with 13 additions and 1 deletions

View file

@ -1,5 +1,11 @@
{% load thumbnail %}
{% load i18n %}
{% if object_list|length == 0 %}
<p>
{% trans "Could not find any results. Try different keywords or browse the categories." %}
</p>
{% else %}
<div class="row">
{% for object in object_list %}
<div class="col col-12 col-md-6 col-lg-4 d-flex mb-3">
@ -25,3 +31,4 @@
</div>
{% endfor %}
</div>
{% endif %}