From b1e6a583b89dcac198ad2c60b811cf22084945a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 20 Aug 2022 01:26:21 +0200 Subject: [PATCH] Group filter constraints in tabs --- .../Filters/Constraints/NumberConstraint.php | 2 +- templates/Parts/lists/_filter.html.twig | 30 ++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/DataTables/Filters/Constraints/NumberConstraint.php b/src/DataTables/Filters/Constraints/NumberConstraint.php index 1df2f6e3..92ef51ad 100644 --- a/src/DataTables/Filters/Constraints/NumberConstraint.php +++ b/src/DataTables/Filters/Constraints/NumberConstraint.php @@ -76,7 +76,7 @@ class NumberConstraint extends AbstractConstraint } - public function __construct(string $property, string $identifier = null, $value1 = null, $operator = '>', $value2 = null) + public function __construct(string $property, string $identifier = null, $value1 = null, $operator = null, $value2 = null) { parent::__construct($property, $identifier); $this->value1 = $value1; diff --git a/templates/Parts/lists/_filter.html.twig b/templates/Parts/lists/_filter.html.twig index f4510002..825ab339 100644 --- a/templates/Parts/lists/_filter.html.twig +++ b/templates/Parts/lists/_filter.html.twig @@ -1,8 +1,36 @@
-
Filter
+
Filter
+ + {{ form_start(filterForm) }} +
+
+ {{ form_row(filterForm.name) }} + {{ form_row(filterForm.description) }} +
+ +
+ {{ form_row(filterForm.favorite) }} + {{ form_row(filterForm.needsReview) }} + {{ form_row(filterForm.mass) }} + {{ form_row(filterForm.lastModified) }} + {{ form_row(filterForm.addedDate) }} +
+ +
+ + + {{ form_row(filterForm.submit) }} + {{ form_end(filterForm) }}
\ No newline at end of file