Merge pull request #1002 from eeintech/empty_search_query

Empty search query returned all elements from database
This commit is contained in:
Oliver 2020-10-01 09:34:02 +10:00 committed by GitHub
commit 7356fc3dfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,8 +18,10 @@ InvenTree | {% trans "Search Results" %}
<br><br>
<hr>
{% if query %}
<div id='no-search-results'>
<h4><i>{% trans "No results found" %}</i></h4>
<h4><i>{% trans "No results found for " %}'{{ query }}'</i></h4>
</div>
{% include "InvenTree/search_part_category.html" with collapse_id="categories" %}
@ -34,6 +36,14 @@ InvenTree | {% trans "Search Results" %}
{% include "InvenTree/search_stock_items.html" with collapse_id="stock" %}
{% else %}
<div id='empty-search-query'>
<h4><i>{% trans "Enter a search query" %}</i></h4>
</div>
{% endif %}
{% endblock %}
{% block js_load %}