From 30d0060b96c9c18d6565c1140033cbed608b4ea8 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 13 Feb 2018 22:17:59 +0100 Subject: [PATCH] Move pagination to fieldset --- adminer/select.inc.php | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 2f2ad0e9..eeb994f0 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -478,15 +478,28 @@ if (!$columns && support("table")) { } } - if ($limit != "" && ($found_rows === false || $found_rows > $limit || $page)) { - echo "

\n"; + $pagination = ($limit != "" && ($found_rows === false || $found_rows > $limit || $page)); + if ($pagination) { + echo (($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit + ? '

' . lang('Load more data') . '' + . script("qsl('a').onclick = partial(selectLoadMore, " . (+$limit) . ", '" . lang('Loading') . "...');", "") + : '' + ); + echo "\n"; + } + } + + echo "