diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-16 21:09:50 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-16 21:09:50 -0500 |
commit | 1e466a66dbb6e060b2fc7c0c5d3edb2b19079e4a (patch) | |
tree | 0aa888eed384150591b97f6c07939141fd0716ee /app/helpers.php | |
parent | 8bf50d6a7ff460820efe098413626307216f8c34 (diff) |
Hide pagination when not necessary
Diffstat (limited to 'app/helpers.php')
-rw-r--r-- | app/helpers.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers.php b/app/helpers.php index b53e59e7..ac5b788f 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -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">'; |