From 1df0aa7332d44eb1c86a00c81ee617f7c2d1558c Mon Sep 17 00:00:00 2001 From: Christophe Siraut Date: Tue, 12 Nov 2024 10:02:48 +0100 Subject: [PATCH] templates/list_pagination: add links to first and last pages --- .../aircox/widgets/list_pagination.html | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 radiocampus/templates/aircox/widgets/list_pagination.html diff --git a/radiocampus/templates/aircox/widgets/list_pagination.html b/radiocampus/templates/aircox/widgets/list_pagination.html new file mode 100644 index 0000000..3542f76 --- /dev/null +++ b/radiocampus/templates/aircox/widgets/list_pagination.html @@ -0,0 +1,45 @@ +{% comment %} +Context: +- is_paginated: if True, page is paginated +- page_obj: page object from list view; +{% endcomment %} +{% load i18n aircox %} + +{% if is_paginated %} +
+{% update_query request.GET.copy page=None as GET %} +{% with GET.urlencode as GET %} + +{% endwith %} +{% endif %}