From 9d07f06ab3cdae6fdc0d87a3166df8b5f131093f Mon Sep 17 00:00:00 2001 From: Ambulance Clerc Date: Tue, 10 Oct 2023 13:40:05 +0200 Subject: [PATCH] Changement sur la base --- templates/rangefilter/date_filter.html | 138 +++++++++++++++++ templates/rangefilter/date_filter_1_8.html | 94 ++++++++++++ templates/rangefilter/date_filter_csp.html | 145 ++++++++++++++++++ .../date_range_quick_select_list_filter.html | 16 ++ templates/rangefilter/numeric_filter.html | 59 +++++++ 5 files changed, 452 insertions(+) create mode 100644 templates/rangefilter/date_filter.html create mode 100644 templates/rangefilter/date_filter_1_8.html create mode 100644 templates/rangefilter/date_filter_csp.html create mode 100644 templates/rangefilter/date_range_quick_select_list_filter.html create mode 100644 templates/rangefilter/numeric_filter.html diff --git a/templates/rangefilter/date_filter.html b/templates/rangefilter/date_filter.html new file mode 100644 index 0000000..1666b37 --- /dev/null +++ b/templates/rangefilter/date_filter.html @@ -0,0 +1,138 @@ +{% load i18n rangefilter_compat %} +

{{ title }}

+ + +{% comment %} +Force load jsi18n, issues #5 +https://github.com/django/django/blob/stable/1.10.x/django/contrib/admin/templates/admin/change_list.html#L7 +{% endcomment %} + + + +{% block quick-select-choices %}{% endblock %} +
+ + {{ spec.form.as_p }} + {% for choice in choices %} + + {% endfor %} +
diff --git a/templates/rangefilter/date_filter_1_8.html b/templates/rangefilter/date_filter_1_8.html new file mode 100644 index 0000000..09093d3 --- /dev/null +++ b/templates/rangefilter/date_filter_1_8.html @@ -0,0 +1,94 @@ +{% load i18n rangefilter_compat %} +

{{ title }}

+ + +{% comment %} +Force load jsi18n, issues #5 +https://github.com/django/django/blob/stable/1.8.x/django/contrib/admin/templates/admin/change_list.html#L7 +{% endcomment %} + + + +
+
+ {{ spec.form }} + {% for choice in choices %} + + {% endfor %} +
+ + +
+
+
diff --git a/templates/rangefilter/date_filter_csp.html b/templates/rangefilter/date_filter_csp.html new file mode 100644 index 0000000..98b493c --- /dev/null +++ b/templates/rangefilter/date_filter_csp.html @@ -0,0 +1,145 @@ +{% load i18n rangefilter_compat %} +

{{ title }}

+ + + +{% comment %} +Force load jsi18n, issues #5 +https://github.com/django/django/blob/stable/1.10.x/django/contrib/admin/templates/admin/change_list.html#L7 +{% endcomment %} + + + + +
+
+ {{ spec.form.as_p }} + {% for choice in choices %} + + {% endfor %} +
+ + +
+
+
+ +{% comment %} JS not requiring template variables refactored as an iife {% endcomment %} + diff --git a/templates/rangefilter/date_range_quick_select_list_filter.html b/templates/rangefilter/date_range_quick_select_list_filter.html new file mode 100644 index 0000000..ec34a05 --- /dev/null +++ b/templates/rangefilter/date_range_quick_select_list_filter.html @@ -0,0 +1,16 @@ +{% extends 'rangefilter/date_filter.html' %} + +{% block quick-select-choices %} + {% comment %} + The following code under the