From cdb0b9a787e1a63843819c3c8c5a6cd9930d4c31 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:42:30 +0200 Subject: [PATCH] Improve deleted packages lists in trash --- .../scheming_dcat/templates/admin/trash.html | 38 +++++++++++ .../scheming_dcat/snippets/data_type.html | 63 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 ckanext/scheming_dcat/templates/admin/trash.html create mode 100644 ckanext/scheming_dcat/templates/scheming_dcat/snippets/data_type.html diff --git a/ckanext/scheming_dcat/templates/admin/trash.html b/ckanext/scheming_dcat/templates/admin/trash.html new file mode 100644 index 00000000..2a402d04 --- /dev/null +++ b/ckanext/scheming_dcat/templates/admin/trash.html @@ -0,0 +1,38 @@ +{% ckan_extends %} + +{% block primary_content_inner %} +
+ {{ h.csrf_input() }} +
+ + + {{ _('Purge all') }} + +
+
+ +{% for ent_type, entities in data.items() %} + {% snippet "scheming_dcat/snippets/data_type.html", ent_type=ent_type, entities=entities, messages=messages %} +{% endfor %} +{% endblock %} + +{% block secondary_content %} +
+

+ + {{ _("Trash") }} +

+
+

+ {% trans %} + Purge deleted datasets, organizations or groups forever and irreversibly. + {% endtrans %} +

+
+
+{% endblock %} \ No newline at end of file diff --git a/ckanext/scheming_dcat/templates/scheming_dcat/snippets/data_type.html b/ckanext/scheming_dcat/templates/scheming_dcat/snippets/data_type.html new file mode 100644 index 00000000..49cd43e2 --- /dev/null +++ b/ckanext/scheming_dcat/templates/scheming_dcat/snippets/data_type.html @@ -0,0 +1,63 @@ + + + +
+ {% set truncate = truncate or 180 %} + {% set truncate_title = truncate_title or 80 %} + + + + {% if entities.first() %} +
+ + + {{ _('Purge') }} + +
+ {% endif %} +
\ No newline at end of file