store search in session (#2735)

* allow to detect used query filters
* allow to set label in action buttons
* allow to reset last search from session
* migrate invoice archive to new search system
* display number of used search filters
This commit is contained in:
Kevin Papst
2021-08-26 01:37:40 +02:00
committed by GitHub
parent 56524a9773
commit 98a3fc99a2
55 changed files with 365 additions and 81 deletions

View File

@@ -359,6 +359,7 @@
{% set title = null %}
{% set disabled = false %}
{% set attr = {} %}
{% set label = null %}
{% set translation_domain = 'messages' %}
{% if type is same as (false) %}
{% set class = "" %}
@@ -369,6 +370,7 @@
{% endif %}
{% if values is not iterable %}
{% deprecated 'Passing a non iterable action_button is deprecated since 1.15 and will be removed with 2.0' %}
{% set url = values %}
{% if 'onclick:' in url %}
{% set onclick = url|replace({'onclick:': ''}) %}
@@ -393,6 +395,7 @@
{% set title = values.title ?? null %}
{% set class = class ~ ( values.class | default("")) %}
{% set attr = values.attr ?? {} %}
{% set label = values.label ?? null %}
{% set translation_domain = values.translation_domain ?? translation_domain %}
{% endif %}
@@ -412,7 +415,7 @@
{{ ' ' ~ name }}={% if '"' in value %}'{{ value|raw }}'{% else %}"{{ value|raw }}"{% endif %}
{% endfor %}
{% endif %}
>{% if title is not null %}{{ title|trans({}, translation_domain) }}{% else %}{{ _self.icon(icon) }}{% endif %}</a>
>{% if title is not null %}{{ title|trans({}, translation_domain) }}{% else %}{{ _self.icon(icon) }}{% endif %}{% if label is not null %}<span class="label bg-yellow">{{ label }}</span>{% endif %}</a>
{% endapply %}
{% endmacro %}