From 1d0522ea2d9197b1c4e9a051b829a8bfadf40115 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 1 Sep 2024 20:15:55 +0100 Subject: Added pagination to the resource list page --- .../templates/resources/resource_list.html | 48 ++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) (limited to 'pyblackbird_cc/templates') diff --git a/pyblackbird_cc/templates/resources/resource_list.html b/pyblackbird_cc/templates/resources/resource_list.html index cfe5ba3..2ef0d48 100644 --- a/pyblackbird_cc/templates/resources/resource_list.html +++ b/pyblackbird_cc/templates/resources/resource_list.html @@ -7,7 +7,7 @@ {% block content %}
- {% include "resources/admin_bar.html" %} + {% include "resources/admin_bar.html" %}
{# featured resources #} @@ -34,7 +34,7 @@ {% endif %} {# standard resources #} -{% if resource_list %} +{% if page_obj.object_list %}
Standard resources
@@ -42,10 +42,52 @@
- {% for resource in resource_list %} + {% for resource in page_obj.object_list %} {% include "resources/resource_card_standard.html" with resource=resource %} {% endfor %}
+ + {% if page_obj.has_other_pages %} +
+
+ +
+
+ {% endif %} {% else %}

There are no resources

{% endif %} -- cgit v1.2.3