From 2feb9b90b26bbc6a2296fbb1359012fc06b25f39 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Tue, 18 Jan 2022 08:24:46 -0800 Subject: [PATCH] housekeep: move templates/partials/widgets/* to templates/partials/ Signed-off-by: Kevin Morris --- templates/packages/index.html | 4 ++-- templates/partials/packages/statistics.html | 2 +- templates/partials/{widgets => }/pager.html | 0 templates/partials/{widgets => }/statistics.html | 0 templates/requests.html | 4 ++-- test/test_templates.py | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) rename templates/partials/{widgets => }/pager.html (100%) rename templates/partials/{widgets => }/statistics.html (100%) diff --git a/templates/packages/index.html b/templates/packages/index.html index 61533524..6034d2f6 100644 --- a/templates/packages/index.html +++ b/templates/packages/index.html @@ -67,7 +67,7 @@ singular = "%d package found.", plural = "%d packages found.", prefix = "/packages" %} - {% include "partials/widgets/pager.html" %} + {% include "partials/pager.html" %} {% endwith %} {# Package action form: persists query parameters. #} @@ -84,7 +84,7 @@ singular = "%d package found.", plural = "%d packages found.", prefix = "/packages" %} - {% include "partials/widgets/pager.html" %} + {% include "partials/pager.html" %} {% endwith %} {% if request.user.is_authenticated() %} diff --git a/templates/partials/packages/statistics.html b/templates/partials/packages/statistics.html index f841ae0e..8a6546b9 100644 --- a/templates/partials/packages/statistics.html +++ b/templates/partials/packages/statistics.html @@ -51,5 +51,5 @@ {% if request.user.is_authenticated() %} - {% include 'partials/widgets/statistics.html' %} + {% include 'partials/statistics.html' %} {% endif %} diff --git a/templates/partials/widgets/pager.html b/templates/partials/pager.html similarity index 100% rename from templates/partials/widgets/pager.html rename to templates/partials/pager.html diff --git a/templates/partials/widgets/statistics.html b/templates/partials/statistics.html similarity index 100% rename from templates/partials/widgets/statistics.html rename to templates/partials/statistics.html diff --git a/templates/requests.html b/templates/requests.html index 6701af5d..c9e63e60 100644 --- a/templates/requests.html +++ b/templates/requests.html @@ -8,7 +8,7 @@ {% if not total %}

{{ "No requests matched your search criteria." | tr }}

{% else %} - {% include "partials/widgets/pager.html" %} + {% include "partials/pager.html" %} @@ -121,7 +121,7 @@ {% endfor %}
- {% include "partials/widgets/pager.html" %} + {% include "partials/pager.html" %} {% endif %} {% endblock %} diff --git a/test/test_templates.py b/test/test_templates.py index 96380fbe..0d36d0b9 100644 --- a/test/test_templates.py +++ b/test/test_templates.py @@ -142,7 +142,7 @@ def test_pager_no_results(): """ Test the pager partial with no results. """ num_packages = 0 context = pager_context(num_packages) - body = base_template("partials/widgets/pager.html").render(context) + body = base_template("partials/pager.html").render(context) root = parse_root(body) stats = root.xpath('//div[@class="pkglist-stats"]/p') @@ -154,7 +154,7 @@ def test_pager(): """ Test the pager partial with two pages of results. """ num_packages = 100 context = pager_context(num_packages) - body = base_template("partials/widgets/pager.html").render(context) + body = base_template("partials/pager.html").render(context) root = parse_root(body) stats = root.xpath('//div[@class="pkglist-stats"]/p')