{% extends "atoum/base.html" %} {% load atoum crispy_forms_tags i18n %} {% block title-content %}{% spaceless %}

{% translate "Search" %}

{% endspaceless %}{% endblock title-content %} {% block app_content %}
{% crispy form %}
{% if query %}

{% translate "Results" %}

{% with results=page_obj.object_list %} {% if results %}
{% for result in results %} {% if result.model_name == "assortment" %} {% translate "Assortment" %}
{{ result.object.title }}
{% translate "In consumable" %} {{ result.object.consumable.title }}
{% elif result.model_name == "category" %} {% translate "Category" %}
{{ result.object.title }}
{% translate "In assortment" %} {{ result.object.assortment.title }}
{% elif result.model_name == "consumable" %} {% translate "Consumable" %}
{{ result.object.title }}
{% elif result.model_name == "product" %} {% translate "Product" %}
{{ result.object.title }}
{% translate "In category" %} {{ result.object.category.title }}
{% endif %} {% endfor %}
{% else %}

{% translate "No results found." %}

{% endif %} {% endwith %} {% include "atoum/pagination.html" with page=page_obj query=query %} {% else %}

{% translate "No search pattern was submitted." %}

{% endif %}
{% endblock app_content %}