From 82184bdcae000dc8517db607580f52d9cc8d94f1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 1 Apr 2014 07:39:16 +0200 Subject: [PATCH] limit pager to one line by restricting the number of pages to 20 --- views/bootstrap/class.Bootstrap.php | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 6dfc28185..540caf47b 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -525,6 +525,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);; function pageList($pageNumber, $totalPages, $baseURI, $params) { /* {{{ */ + $maxpages = 20; // skip pages when more than this is shown + $range = 5; // pages left and right of current page if (!is_numeric($pageNumber) || !is_numeric($totalPages) || $totalPages<2) { return; } @@ -554,9 +556,29 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "
"; echo "