mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 10:24:31 +02:00
Added possibility to apply filters to search results.
This commit is contained in:
parent
c3f144447f
commit
e96db21ceb
6 changed files with 61 additions and 30 deletions
|
@ -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>
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue