]> git.joonet.de Git - adminer.git/commitdiff
Display pagination on a fixed position
authorJakub Vrana <jakub@vrana.cz>
Wed, 3 Apr 2013 01:31:36 +0000 (18:31 -0700)
committerJakub Vrana <jakub@vrana.cz>
Wed, 3 Apr 2013 01:35:23 +0000 (18:35 -0700)
adminer/select.inc.php
adminer/static/default.css
changes.txt

index 410b1f69a36cd2b42fa67393c7bba561c9769bc9..51c0aef5c73aedb927189e4e4315f1c9df5f9a2b 100644 (file)
@@ -436,8 +436,8 @@ if (!$columns) {
                                        $exact_count = false;
                                }
                        }
-                       echo "<p class='pages'>";
                        if (+$limit && ($found_rows === false || $found_rows > $limit || $page)) {
+                               echo "<p class='pages'>";
                                // 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) : ' <a href="' . h(remove_from_uri("page") . "&page=last") . '">' . lang('last') . "</a>");
                                }
+                               echo (($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit ? ' <a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" onclick="return !selectLoadMore(this, ' . (+$limit) . ', \'' . lang('Loading') . '\');">' . lang('Load more data') . '</a>' : '');
                        }
-                       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 ? ' <a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" onclick="return !selectLoadMore(this, ' . (+$limit) . ', \'' . lang('Loading') . '\');">' . lang('Load more data') . '</a>' : '');
-                       echo " " . checkbox("all", 1, 0, lang('whole result')) . "\n";
+                       echo "<p>\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()) {
                                ?>
index f58452c34ae4bd7aecdef0c7ede2a397db840050..99bc09f24679579c75be421987ead1de0cd4f653 100644 (file)
@@ -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; }
index c57cc0487f86343c7d889cee5dec2cb1cf72da49..8f99074648b329c84127b81a1f8f355b890eb992 100644 (file)
@@ -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