diff --git a/CHANGELOG.md b/CHANGELOG.md index 7761553..9e5def0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,5 @@ ## [Unreleased] -### Added -* feat(repository): add RepositoryQuery::addCaseInsensitiveFilters() -* feat(repository): add RepositoryQuery::addForcedFilterHandler() - -### Fixed -* fix(crud/index): fix row attribute value render -* fix(crud/navigation_setting): fix form action -* fix(crud/template): use default route params - ## [v1.27.0] - 2025-12-22 ### Fixed * fix(crud): use route params to redirect after a delation diff --git a/src/core/Repository/RepositoryQuery.php b/src/core/Repository/RepositoryQuery.php index e2943b0..904c965 100644 --- a/src/core/Repository/RepositoryQuery.php +++ b/src/core/Repository/RepositoryQuery.php @@ -18,7 +18,6 @@ abstract class RepositoryQuery protected PaginatorInterface $paginator; protected string $id; protected array $forcedFilterHandlers = []; - protected array $caseInsensitiveFilters = []; public function __construct(ServiceEntityRepository $repository, string $id, PaginatorInterface $paginator = null) { @@ -89,11 +88,7 @@ abstract class RepositoryQuery $this->andWhere('.'.$name.' = :'.$name); $this->setParameter(':'.$name, $value); } elseif (is_string($value)) { - if (in_array($name, $this->caseInsensitiveFilters)) { - $this->andWhere(sprintf('LOWER ( .%1$s) LIKE LOWER(:%1$s)', $name)); - } else { - $this->andWhere('.'.$name.' LIKE :'.$name); - } + $this->andWhere('.'.$name.' LIKE :'.$name); $this->setParameter(':'.$name, '%'.$value.'%'); } else { $this->filterHandler($name, $value); @@ -147,18 +142,4 @@ abstract class RepositoryQuery protected function filterHandler(string $name, $value) { } - - protected function addCaseInsensitiveFilters(string $name): self - { - $this->caseInsensitiveFilters[] = $name; - - return $this; - } - - protected function addForcedFilterHandlers(string $name): self - { - $this->forcedFilterHandlers[] = $name; - - return $this; - } } diff --git a/src/core/Resources/views/admin/crud/index.html.twig b/src/core/Resources/views/admin/crud/index.html.twig index ae40134..fa5dcda 100644 --- a/src/core/Resources/views/admin/crud/index.html.twig +++ b/src/core/Resources/views/admin/crud/index.html.twig @@ -196,7 +196,7 @@ {% set rowAttributes = configuration.listRowAttributes(context, item) %} {% set rowClasses = rowAttributes['class']|default('') %} - + {% if configuration.hasBatchAction(context) %} diff --git a/src/core/Resources/views/admin/crud/show.html.twig b/src/core/Resources/views/admin/crud/show.html.twig index d98dd22..2cefa56 100644 --- a/src/core/Resources/views/admin/crud/show.html.twig +++ b/src/core/Resources/views/admin/crud/show.html.twig @@ -18,7 +18,7 @@ {% block header_actions_before %}{% endblock %} {% if configuration.action(context, 'back', true) %} - + {{ configuration.actionTitle(context, 'back', 'Back to the list')|trans }} @@ -27,7 +27,7 @@ {% endif %} {% if configuration.action(context, 'edit', true, [entity]) %} - + diff --git a/src/core/Resources/views/setting/navigation_setting_admin/edit.html.twig b/src/core/Resources/views/setting/navigation_setting_admin/edit.html.twig index e1488ef..52a9aff 100644 --- a/src/core/Resources/views/setting/navigation_setting_admin/edit.html.twig +++ b/src/core/Resources/views/setting/navigation_setting_admin/edit.html.twig @@ -13,7 +13,7 @@