From ddaf69fdc4da75f12f7a0dad9e6f37cba490e967 Mon Sep 17 00:00:00 2001 From: James Outterside Date: Thu, 28 Apr 2022 15:09:53 +0100 Subject: [PATCH 1/2] Fixed issue with Admin styling affecting newer versions of Django --- .../gdpr_assist/admin/pd_change_list.html | 197 +++++++++--------- 1 file changed, 101 insertions(+), 96 deletions(-) diff --git a/gdpr_assist/templates/gdpr_assist/admin/pd_change_list.html b/gdpr_assist/templates/gdpr_assist/admin/pd_change_list.html index 53fd0e3..7fa1e3d 100644 --- a/gdpr_assist/templates/gdpr_assist/admin/pd_change_list.html +++ b/gdpr_assist/templates/gdpr_assist/admin/pd_change_list.html @@ -2,119 +2,124 @@ {% load i18n static %} {% block extrastyle %} - {{ block.super }} - - {% if cl.formset %} - - {% endif %} - {% if cl.formset or action_form %} - - {% endif %} - {{ media.css }} - - + {{ block.super }} + + {% if cl.formset %} + + {% endif %} + {% if cl.formset or action_form %} + + {% endif %} + {{ media.css }} + + {% endblock %} {% block extrahead %} -{{ block.super }} -{{ media.js }} + {{ block.super }} + {{ media.js }} {% endblock %} {% block breadcrumbs %} - + {% endblock %} {% block content %} -
-
+
+
+
+
+ +
-
- -
- -
- {% csrf_token %} - - - {% for group in results %} - {% if forloop.first %} -
- - -
+ + + {% for group in results %} + {% if forloop.first %} +
+ + +
+ + + + + + + + + + + + {% endif %} -
+
+
+
+
Select all
+
- - - - - - - - - - {% endif %} - - - - - - {% if not group.model.check_can_anonymise %} - - {% endif %} - {% for obj in group.results %} - - - - - {% endfor %} - - {% if forloop.last %} - -
-
-
-
-
Select all
-
-

{{ group.app_label.title }}: {{ group.model_name.title }}

-
- {% url group.url_change_name as obj_change_url %} - These records will not be anonymised, they can be exported or if you wish to delete them - please do so via their admin page. + +

{{ group.app_label.title }}: {{ group.model_name.title }}

- - - {% url group.url_name obj.pk as obj_url %} - {% if obj_url %}{% endif %}{{ obj }}{% if obj_url %}{% endif %} -
- {% endif %} - {% empty %} -

No results found.

- {% endfor %} - -
+ + {% if not group.model.check_can_anonymise %} + + + {% url group.url_change_name as obj_change_url %} + These records will not be anonymised, they can be exported or if you wish to delete them + please do so via their admin page. + + + {% endif %} + {% for obj in group.results %} + + + + + + {% url group.url_name obj.pk as obj_url %} + {% if obj_url %}{% endif %}{{ obj }}{% if obj_url %} + {% endif %} + + + {% endfor %} + + {% if forloop.last %} + + + {% endif %} + {% empty %} +

No results found.

+ {% endfor %} + + +
+
-
{% endblock %} From f025a0a2f98db6ae38771297bac1012127383906 Mon Sep 17 00:00:00 2001 From: James Outterside Date: Thu, 28 Apr 2022 15:18:12 +0100 Subject: [PATCH 2/2] Fix format for test --- .../gdpr_assist/admin/pd_change_list.html | 166 +++++++++--------- 1 file changed, 81 insertions(+), 85 deletions(-) diff --git a/gdpr_assist/templates/gdpr_assist/admin/pd_change_list.html b/gdpr_assist/templates/gdpr_assist/admin/pd_change_list.html index 7fa1e3d..268953a 100644 --- a/gdpr_assist/templates/gdpr_assist/admin/pd_change_list.html +++ b/gdpr_assist/templates/gdpr_assist/admin/pd_change_list.html @@ -2,82 +2,80 @@ {% load i18n static %} {% block extrastyle %} - {{ block.super }} - - {% if cl.formset %} - - {% endif %} - {% if cl.formset or action_form %} - - {% endif %} - {{ media.css }} - - + {{ block.super }} + + {% if cl.formset %} + + {% endif %} + {% if cl.formset or action_form %} + + {% endif %} + {{ media.css }} + + {% endblock %} {% block extrahead %} - {{ block.super }} - {{ media.js }} +{{ block.super }} +{{ media.js }} {% endblock %} {% block breadcrumbs %} - + {% endblock %} {% block content %} -
-
-
-
- +
+
+
+
+ +
-
- {% csrf_token %} - - - {% for group in results %} - {% if forloop.first %} -
- - -
- - - - - - - - - - - - {% endif %} + + {% csrf_token %} + + + {% for group in results %} + {% if forloop.first %} +
+ + +
+ +
-
-
-
-
Select all
-
+ + + + + + + + + + {% endif %} {% endif %} {% for obj in group.results %} - - - - + + + + {% endfor %} - {% if forloop.last %} - -
+
+
+
+
Select all
+
@@ -95,31 +93,29 @@

{{ group.app_label.title }}: {{ group.model_name.title }}

- - - {% url group.url_name obj.pk as obj_url %} - {% if obj_url %}{% endif %}{{ obj }}{% if obj_url %} - {% endif %} -
+ + + {% url group.url_name obj.pk as obj_url %} + {% if obj_url %}{% endif %}{{ obj }}{% if obj_url %}{% endif %} +
- {% endif %} - {% empty %} -

No results found.

- {% endfor %} + {% if forloop.last %} + + + {% endif %} + {% empty %} +

No results found.

+ {% endfor %} -
-
+
+
{% endblock %}