Mercurial > hg > ltpdarepo
changeset 182:2c1253e826cc
Enforce minimum number of items per page.
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Tue, 08 Nov 2011 11:37:24 +0100 |
parents | 342125a26ff1 |
children | 90b18bfd7375 |
files | src/ltpdarepo/templates/pagination.html |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ltpdarepo/templates/pagination.html Tue Nov 08 11:28:39 2011 +0100 +++ b/src/ltpdarepo/templates/pagination.html Tue Nov 08 11:37:24 2011 +0100 @@ -4,10 +4,14 @@ {% if pagination.count > pagination.size %} <span>{{ pagination.size }} of {{ pagination.count }} objects</span> <a href="{{ url_for_other_size(pagination.size * 2) }}">show more</a> + {% if pagination.size > 16 %} <a href="{{ url_for_other_size(pagination.size // 2) }}">less</a> + {% endif %} {% else %} <span>{{ pagination.count }} objects</span> + {% if pagination.size > 16 %} <a href="{{ url_for_other_size(pagination.size // 2) }}">show less</a> + {% endif %} {% endif %} </div> <div class="pages">