feat: admin list filtering and search
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
{#
|
||||
Renders query parameters as hidden inputs so they survive a filter submit.
|
||||
|
||||
A filter form only submits its own fields, so anything else that describes the current list —
|
||||
the sorting, the page size, the return URL — has to be carried along explicitly or it is lost
|
||||
the moment somebody searches.
|
||||
#}
|
||||
{% macro render(values, prefix) %}
|
||||
{%- for key, value in values -%}
|
||||
{%- set name = prefix ? prefix ~ '[' ~ key ~ ']' : key -%}
|
||||
{%- if value is iterable -%}
|
||||
{{ _self.render(value, name) }}
|
||||
{%- else -%}
|
||||
<input type="hidden" name="{{ name }}" value="{{ value }}">
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user