diff mbox

[31/51] paginator: Tweak the number of pages shown

Message ID 1440440620-25937-32-git-send-email-damien.lespiau@intel.com
State Changes Requested
Headers show

Commit Message

Damien Lespiau Aug. 24, 2015, 6:23 p.m. UTC
From: Belén Barros Peña <belen.barros.pena@intel.com>

We don't really need that many pages displayed in the pagination, tweak
the numbers down a bit.

Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 patchwork/paginator.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Stephen Finucane Sept. 9, 2015, 3:22 p.m. UTC | #1
> From: Belén Barros Peña <belen.barros.pena@intel.com>

> 

> We don't really need that many pages displayed in the pagination, tweak

> the numbers down a bit.

> 

> Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com>

> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>


Purely stylistic, but OK.

Acked-by: Stephen Finucane <stephen.finucane@intel.com>
diff mbox

Patch

diff --git a/patchwork/paginator.py b/patchwork/paginator.py
index 31c0190..286372f 100644
--- a/patchwork/paginator.py
+++ b/patchwork/paginator.py
@@ -23,10 +23,12 @@  from django.conf import settings
 
 DEFAULT_PATCHES_PER_PAGE = 100
 LONG_PAGE_THRESHOLD = 30
-LEADING_PAGE_RANGE_DISPLAYED = TRAILING_PAGE_RANGE_DISPLAYED = 10
-LEADING_PAGE_RANGE = TRAILING_PAGE_RANGE = 8
+LEADING_PAGE_RANGE_DISPLAYED = 4
+TRAILING_PAGE_RANGE_DISPLAYED = 2
+LEADING_PAGE_RANGE = 4
+TRAILING_PAGE_RANGE = 2
 NUM_PAGES_OUTSIDE_RANGE = 2
-ADJACENT_PAGES = 4
+ADJACENT_PAGES = 1
 
 # parts from:
 #  http://blog.localkinegrinds.com/2007/09/06/digg-style-pagination-in-django/