From 908c466a5895b5f949f3037a242f76eaf6c5bfb9 Mon Sep 17 00:00:00 2001 From: Lova Andriarimalala <43842786+Xpirix@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:26:23 +0300 Subject: [PATCH] Add pagination --- qgis-app/base/views/processing_view.py | 8 ++--- qgis-app/templates/base/list_galery.html | 2 +- qgis-app/templates/base/list_pagination.html | 36 ++++++++++++++++++++ qgis-app/templates/base/list_table.html | 2 +- 4 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 qgis-app/templates/base/list_pagination.html diff --git a/qgis-app/base/views/processing_view.py b/qgis-app/base/views/processing_view.py index b01e83f5..5ebd40f8 100644 --- a/qgis-app/base/views/processing_view.py +++ b/qgis-app/base/views/processing_view.py @@ -380,12 +380,8 @@ def get_queryset(self): def get_template_names(self): context = self.get_context_data() - is_gallery = context["is_gallery"] - if is_gallery: - self.paginate_by = settings.PAGINATION_DEFAULT_PAGINATION - return "base/list_galery.html" - else: - return "base/list.html" + self.paginate_by = settings.PAGINATION_DEFAULT_PAGINATION + return "base/list_galery.html" def get_paginate_by(self, queryset): is_gallery = self.request.GET.get("is_gallery", None) diff --git a/qgis-app/templates/base/list_galery.html b/qgis-app/templates/base/list_galery.html index 9b2ffe0d..2cd1064a 100644 --- a/qgis-app/templates/base/list_galery.html +++ b/qgis-app/templates/base/list_galery.html @@ -131,7 +131,7 @@

{% if title %}{{title}}{% else %}{% trans "All" %} {{ res