diff --git a/main/inc/lib/sortabletable.class.php b/main/inc/lib/sortabletable.class.php
index 261a7c9ddb..a66b7932e8 100755
--- a/main/inc/lib/sortabletable.class.php
+++ b/main/inc/lib/sortabletable.class.php
@@ -181,7 +181,7 @@ class SortableTable extends HTML_Table {
$params['prevImg'] = Display :: return_icon('action_prev.png', get_lang('PreviousPage'), $icon_attributes);
$params['nextImg'] = Display :: return_icon('action_next.png', get_lang('NextPage'), $icon_attributes);
$params['firstPageText'] = Display :: return_icon('action_first.png', get_lang('FirstPage'), $icon_attributes);
- $params['lastPageText'] = Display :: return_icon('action_last.png', get_lang('LastPage'), $icon_attributes);
+ $params['lastPageText'] = Display :: return_icon('action_last.png', get_lang('LastPage'), $icon_attributes);
$params['firstPagePre'] = '';
$params['lastPagePre'] = '';
$params['firstPagePost'] = '';
@@ -215,21 +215,27 @@ class SortableTable extends HTML_Table {
}
$html = '';
if (!$empty_table) {
- $form = $this->get_page_select_form();
- $nav = $this->get_navigation_html();
- $html = '
';
- $html .= '';
- $html .= '';
- $html .= $form;
- $html .= ' | ';
- $html .= '';
- $html .= $this->get_table_title();
- $html .= ' | ';
- $html .= '';
- $html .= $nav;
- $html .= ' | ';
- $html .= '
';
- $html .= '
';
+ $form = $this->get_page_select_form();
+ $nav = $this->get_navigation_html();
+
+ //Only show pagination info when there are items to paginate
+
+ if ($this->total_number_of_items > $this->default_items_per_page) {
+ $html = '';
+ $html .= '';
+ $html .= '';
+ $html .= $form;
+ $html .= ' | ';
+ $html .= '';
+ $html .= $this->get_table_title();
+ $html .= ' | ';
+ $html .= '';
+ $html .= $nav;
+ $html .= ' | ';
+ $html .= '
';
+ $html .= '
';
+ }
+
if (count($this->form_actions) > 0) {
$html .= '