From 49a7084b6a7d064f1ecfb1f490b232910681b630 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 25 Sep 2015 12:09:54 +0200 Subject: [PATCH] Fix that $firstRow thingy in the user/list view script refs #5543 --- application/views/scripts/user/list.phtml | 32 +++++++++-------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/application/views/scripts/user/list.phtml b/application/views/scripts/user/list.phtml index 627e65b727..8f7d4efcba 100644 --- a/application/views/scripts/user/list.phtml +++ b/application/views/scripts/user/list.phtml @@ -16,30 +16,28 @@ if (! $this->compact): ?>
translate('No backend found which is able to list users') . '
'; return; +} elseif (! $users->hasResult()) { + echo '

' . $this->translate('No users found matching the filter') . '

' . ''; + return; } else { $extensible = $this->hasPermission('config/authentication/users/add') && $backend instanceof Extensible; $reducible = $this->hasPermission('config/authentication/users/remove') && $backend instanceof Reducible; } - -$firstRow = true; -foreach ($users as $user): ?> - - +?> - + - - - - + + + + - - - + + + -hasResult()): ?> - +
translate('Username') ?>translate('Remove') ?>translate('Username') ?>translate('Remove') ?>
qlink($user->user_name, 'user/show', array( 'backend' => $backend->getName(), @@ -65,12 +63,8 @@ foreach ($users as $user): ?>
- -

translate('No users found matching the filter') ?>

- qlink($this->translate('Add a new user'), 'user/add', array('backend' => $backend->getName()), array( 'icon' => 'plus',