From aaba9204510acf6afad8689775014c5fe5979b8e Mon Sep 17 00:00:00 2001 From: Sebastian Helzle Date: Fri, 16 Aug 2024 13:28:17 +0200 Subject: [PATCH] FEATURE: Make number of users per page in user module configurable --- .../Controller/Module/Administration/UsersController.php | 7 +++++++ Neos.Neos/Configuration/Settings.yaml | 2 ++ .../Templates/Module/Administration/Users/Index.html | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Neos.Neos/Classes/Controller/Module/Administration/UsersController.php b/Neos.Neos/Classes/Controller/Module/Administration/UsersController.php index c91ceee1e55..9ddc7cd07fd 100644 --- a/Neos.Neos/Classes/Controller/Module/Administration/UsersController.php +++ b/Neos.Neos/Classes/Controller/Module/Administration/UsersController.php @@ -82,6 +82,12 @@ class UsersController extends AbstractModuleController */ protected $authenticationProviderSettings; + /** + * @Flow\InjectConfiguration(package="Neos.Neos", path="modules.administration.submodules.users.options") + * @var array + */ + protected $moduleOptions; + /** * @return void * @throws NoSuchArgumentException @@ -127,6 +133,7 @@ public function indexAction(string $searchTerm = '', string $sortBy = 'accounts. 'searchTerm' => $searchTerm, 'sortBy' => $sortBy, 'sortDirection' => $sortDirection, + 'usersPerPage' => $this->moduleOptions['usersPerPage'] ?? 10, ]); } diff --git a/Neos.Neos/Configuration/Settings.yaml b/Neos.Neos/Configuration/Settings.yaml index bbaa3f18b5c..935f9ed7bc5 100755 --- a/Neos.Neos/Configuration/Settings.yaml +++ b/Neos.Neos/Configuration/Settings.yaml @@ -370,6 +370,8 @@ Neos: new: label: 'Neos.Neos:Modules:users.actions.new.label' title: 'Neos.Neos:Modules:users.actions.new.title' + options: + usersPerPage: 10 packages: label: 'Neos.Neos:Modules:packages.label' controller: 'Neos\Neos\Controller\Module\Administration\PackagesController' diff --git a/Neos.Neos/Resources/Private/Templates/Module/Administration/Users/Index.html b/Neos.Neos/Resources/Private/Templates/Module/Administration/Users/Index.html index 0982754eed7..a2866a8fd6d 100644 --- a/Neos.Neos/Resources/Private/Templates/Module/Administration/Users/Index.html +++ b/Neos.Neos/Resources/Private/Templates/Module/Administration/Users/Index.html @@ -20,7 +20,7 @@ - +