Hide pagination when not necessary

This commit is contained in:
Frédéric Guillot 2014-11-16 21:09:50 -05:00
parent 8bf50d6a7f
commit 1e466a66db
1 changed files with 4 additions and 0 deletions

View File

@ -618,6 +618,10 @@ function paginate(array $pagination)
{
extract($pagination);
if ($pagination['offset'] === 0 && ($total - $pagination['offset']) < $limit) {
return '';
}
$html = '<div class="pagination">';
$html .= '<span class="pagination-previous">';