From f7fdfdee37cc23132b2ee4505d6cf00e3b283b73 Mon Sep 17 00:00:00 2001 From: MizukiTemma Date: Mon, 23 Sep 2024 15:33:44 +0200 Subject: [PATCH] Apply suggestions --- .../templates/linkcheck/link_list_row.html | 4 ++-- .../templates/linkcheck/links_by_filter.html | 20 +++++++++---------- .../cms/templatetags/linkcheck_filters.py | 2 +- .../views/linkcheck/linkcheck_list_view.py | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/integreat_cms/cms/templates/linkcheck/link_list_row.html b/integreat_cms/cms/templates/linkcheck/link_list_row.html index a1ab2d6134..ec21c22ffe 100644 --- a/integreat_cms/cms/templates/linkcheck/link_list_row.html +++ b/integreat_cms/cms/templates/linkcheck/link_list_row.html @@ -103,7 +103,7 @@ @@ -114,7 +114,7 @@
{% render_field edit_url_form.url|add_error_class:"border-red-500" type="url" form="edit-url-form" %} - {% translate "Cancel" %}
- {% translate "Valid" %} ({{ number_valid_urls }}) - {% translate "Invalid" %} ({{ number_invalid_urls }}) - {% translate "Unchecked" %} ({{ number_unchecked_urls }}) - {% translate "Ignored" %} @@ -58,7 +58,7 @@

{% if request.user.expert_mode %} {% if LINKCHECK_EMAIL_ENABLED %} - {% translate "Email links" %} @@ -67,7 +67,7 @@

{% endif %} {% if LINKCHECK_PHONE_ENABLED %} - {% translate "Phone links" %} @@ -171,16 +171,16 @@

{% if view.kwargs.url_filter == 'ignored' %} {% else %} {% endif %} diff --git a/integreat_cms/cms/templatetags/linkcheck_filters.py b/integreat_cms/cms/templatetags/linkcheck_filters.py index 312a76c009..5d4c75c6f5 100644 --- a/integreat_cms/cms/templatetags/linkcheck_filters.py +++ b/integreat_cms/cms/templatetags/linkcheck_filters.py @@ -57,7 +57,7 @@ def url_anchor_icon(url: Url) -> str: @register.simple_tag @mark_safe -def linkcheck_url(target: str, request: HttpRequest, **kwargs: Any) -> str: +def url_for_current_region(target: str, request: HttpRequest, **kwargs: Any) -> str: """ Return the url matching the target url name, region and other supplied slugs diff --git a/integreat_cms/cms/views/linkcheck/linkcheck_list_view.py b/integreat_cms/cms/views/linkcheck/linkcheck_list_view.py index dcce22c8f9..f449b12b17 100644 --- a/integreat_cms/cms/views/linkcheck/linkcheck_list_view.py +++ b/integreat_cms/cms/views/linkcheck/linkcheck_list_view.py @@ -220,6 +220,6 @@ def post(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: invalidate_model(Link) invalidate_model(Url) - linkcheck_url = reverse("linkcheck", kwargs=kwargs) + url_for_current_region = reverse("linkcheck", kwargs=kwargs) # Keep pagination settings - return redirect(f"{linkcheck_url}{self.get_pagination_params()}") + return redirect(f"{url_for_current_region}{self.get_pagination_params()}")