diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 410b1f69..51c0aef5 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -436,8 +436,8 @@ if (!$columns) { $exact_count = false; } } - echo "

"; if (+$limit && ($found_rows === false || $found_rows > $limit || $page)) { + echo "

"; // display first, previous 4, next 4 and last page $max_page = ($found_rows === false ? $page + (count($rows) >= $limit ? 2 : 1) @@ -451,10 +451,11 @@ if (!$columns) { if ($max_page > 0) { echo ($page + 5 < $max_page ? " ..." : "") . ($exact_count && $found_rows !== false ? pagination($max_page, $page) : ' ' . lang('last') . ""); } + echo (($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit ? ' ' . lang('Load more data') . '' : ''); } - echo ($found_rows !== false ? " (" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ")" : ""); - echo (+$limit && ($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit ? ' ' . lang('Load more data') . '' : ''); - echo " " . checkbox("all", 1, 0, lang('whole result')) . "\n"; + echo "

\n"; + echo ($found_rows !== false ? "(" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " : ""); + echo checkbox("all", 1, 0, lang('whole result')) . "\n"; if ($adminer->selectCommandPrint()) { ?> diff --git a/adminer/static/default.css b/adminer/static/default.css index f58452c3..99bc09f2 100644 --- a/adminer/static/default.css +++ b/adminer/static/default.css @@ -46,6 +46,7 @@ input[type=image] { vertical-align: middle; } .sqlarea { width: 98%; } .icon { width: 18px; height: 18px; } .size { width: 6ex; } +.pages { position: fixed; bottom: 0; left: 21em; padding: 5px; background: #ddf; border: 1px solid #999; } #menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; } #menu p { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; } #dbs { overflow: hidden; } diff --git a/changes.txt b/changes.txt index c57cc048..8f990746 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,5 @@ Adminer 3.6.4-dev: +Display pagination on a fixed position Order by auto_increment column by default Display select SQL edit form inline Compatibility with MySQL 5.6