Fix pagination.
--- a/src/iconolab/views/objects.py Tue May 02 17:28:18 2017 +0200
+++ b/src/iconolab/views/objects.py Tue May 02 18:11:41 2017 +0200
@@ -231,18 +231,25 @@
context['folder_guid'] = folder
+ items_pagination_args = '&'.join([
+ "recent_page="+str(recent_page),
+ "recent_perpage="+str(recent_per_page),
+ "revised_page="+str(revised_page),
+ "revised_perpage="+str(revised_per_page),
+ "contributions_page="+str(contributions_page),
+ "contributions_perpage="+str(contributions_per_page)
+ ])
+
+ if folder is not None:
+ items_pagination_args += "&folder=" + folder
+
context["items_pagination_data"] = self.get_pagination_data(
items_list.all(),
items_page,
items_per_page,
adjacent_pages_count,
perpage_range=[6, 12, 48, 192],
- trailing_qarg="&recent_page="+str(recent_page)
- +"&recent_perpage="+str(recent_per_page)
- +"&revised_page="+str(revised_page)
- +"&revised_perpage="+str(revised_per_page)
- +"&contributions_page="+str(contributions_page)
- +"&contributions_perpage="+str(contributions_per_page)
+ trailing_qarg=items_pagination_args
)
# Paginated recent annotations list