From 4a77bfa44db6788923720faf9ae9ef95e993dddd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 28 Nov 2015 12:24:23 +0000 Subject: [PATCH] Always show previous/next when there are more than one page. git-svn-id: http://svn.redmine.org/redmine/trunk@14901 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/pagination.rb | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/lib/redmine/pagination.rb b/lib/redmine/pagination.rb index 053269a58..e6faa8a68 100644 --- a/lib/redmine/pagination.rb +++ b/lib/redmine/pagination.rb @@ -67,6 +67,10 @@ module Redmine end end + def multiple_pages? + per_page < item_count + end + def first_item item_count == 0 ? 0 : (offset + 1) end @@ -173,13 +177,18 @@ module Redmine page_param = paginator.page_param html = ''