Added possibility to apply filters to search results.

This commit is contained in:
Jan Böhmer 2022-09-10 00:08:59 +02:00
parent c3f144447f
commit e96db21ceb
6 changed files with 61 additions and 30 deletions

View file

@ -123,6 +123,14 @@
</div>
</div>
{# Retain the query parameters of the search form if it is existing #}
{% if searchFilter is defined %}
{% for property, value in searchFilter|toArray %}
<input type="hidden" name="{{ property }}" data-no-clear="true" value="{{ value }}">
{% endfor %}
{% endif %}
{{ form_end(filterForm) }}
</div>
</div>

View file

@ -1,11 +1,15 @@
{% extends "base.html.twig" %}
{% block title %}
{% trans %}parts_list.search.title{% endtrans %} {{ keyword }}
{% trans %}parts_list.search.title{% endtrans %}: {{ keyword }}
{% endblock %}
{% block content %}
<div class="accordion mb-3">
{% include "Parts/lists/_filter.html.twig" %}
</div>
{% include "Parts/lists/_parts_list.html.twig" %}
{% endblock %}