# HG changeset patch # User Alexandre Segura # Date 1493741501 -7200 # Node ID 2b6699e96ab6bc0e659216928ea7b027de553496 # Parent 836e311fb17db0d85112c20c4a4b7f57d017d26b Fix pagination. diff -r 836e311fb17d -r 2b6699e96ab6 src/iconolab/views/objects.py --- 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