From 98262d672b149703b7ffe5447c251c9fcf1422ff Mon Sep 17 00:00:00 2001 From: Lauren Qurashi <46787754+LaurenQurashi@users.noreply.github.com> Date: Fri, 15 Sep 2023 10:41:41 +0100 Subject: [PATCH] TP2000-959 measure list pagination fix (#1026) * Fix pagination and refactor template * Add comment * Increase per page number * Refactor context --- measures/jinja2/measures/list.jinja | 117 +++++++++++++++++++++++++++- measures/views.py | 34 +++++++- 2 files changed, 148 insertions(+), 3 deletions(-) diff --git a/measures/jinja2/measures/list.jinja b/measures/jinja2/measures/list.jinja index 40085e0ef..3c79c71f5 100644 --- a/measures/jinja2/measures/list.jinja +++ b/measures/jinja2/measures/list.jinja @@ -1,4 +1,119 @@ +{% extends "layouts/layout.jinja" %} + +{% from "components/button/macro.njk" import govukButton %} +{% from "components/input/macro.njk" import govukInput %} +{% from "components/table/macro.njk" import govukTable %} + {% set form_url = "measure-ui-list" %} {% set list_include = "includes/measures/list.jinja" %} -{%- include "layouts/list_vertical.jinja" -%} +{% set page_title = "Find and edit " ~ object_list.model._meta.verbose_name_plural %} + + +{% block content %} +
+ Select one or more options to search +
+ ++ {{ objects_count }} results +
+ + {% endif %} + {% if object_list %} + {% include list_include %} + {% else %} +There are no results for your search, please:
+