some fixes in backoffice listing
This commit is contained in:
parent
31cbfce2fe
commit
54e6bc9b72
|
@ -35,7 +35,7 @@ class FormDefUI:
|
|||
if offset and not count:
|
||||
count = 20
|
||||
items, total_count = self.get_listing_items(selected_filter, offset, count)
|
||||
if offset > 0 or total_count > count:
|
||||
if (offset > 0) or (total_count > count > 0):
|
||||
partial_display = True
|
||||
|
||||
if not partial_display:
|
||||
|
@ -105,9 +105,10 @@ class FormDefUI:
|
|||
query['offset'] = max(offset-count, 0)
|
||||
query['count'] = count
|
||||
'<a href="?%s">%s</a>' % (urllib.urlencode(query), _('Previous Page'))
|
||||
else:
|
||||
_('Previous Page')
|
||||
|
||||
if offset + count < total_count:
|
||||
' - '
|
||||
' - '
|
||||
|
||||
if offset + count < total_count:
|
||||
# link to next page
|
||||
|
@ -115,6 +116,8 @@ class FormDefUI:
|
|||
query['offset'] = offset+count
|
||||
query['count'] = count
|
||||
'<a href="?%s">%s</a>' % (urllib.urlencode(query), _('Next Page'))
|
||||
else:
|
||||
_('Next Page')
|
||||
'</div>'
|
||||
|
||||
def get_listing_items(self, selected_filter='all', offset=None, count=None):
|
||||
|
|
Loading…
Reference in New Issue