From f2cd874cdaf13efc0dafe4e989bd282fc61dfd05 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 1 May 2013 12:39:59 +0200 Subject: [PATCH] Adding function that display a "6 of 10" label --- main/inc/lib/display.lib.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 5d3dbb83db..95b61242db 100644 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -1777,4 +1777,19 @@ class Display $html .= ''; return $html; } + + /** + * @param int $current + * @param int $total + * @return null + */ + public static function paginationIndicator($current, $total) + { + $html = null; + if (!empty($current) && !empty($total)) { + $label = sprintf(get_lang('PaginationXofY'), $current, $total); + $html = self::url($label, '#', array('class' => 'btn disabled')); + } + return $html; + } } \ No newline at end of file