From a857531f758c98da42e403dbf544c828660b6861 Mon Sep 17 00:00:00 2001 From: Kai Schlamp Date: Thu, 25 Jan 2024 15:47:37 +0000 Subject: [PATCH] Improve notes list --- radis/core/templates/core/_table_filters.html | 5 ----- radis/notes/templates/notes/note_list.html | 5 ++++- radis/notes/views.py | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 radis/core/templates/core/_table_filters.html diff --git a/radis/core/templates/core/_table_filters.html b/radis/core/templates/core/_table_filters.html deleted file mode 100644 index 0f82552e..00000000 --- a/radis/core/templates/core/_table_filters.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load crispy from crispy_forms_tags %} -
-
{% crispy filter.form %}
-
{% crispy page_size_select %}
-
diff --git a/radis/notes/templates/notes/note_list.html b/radis/notes/templates/notes/note_list.html index b896a457..28b15ab8 100644 --- a/radis/notes/templates/notes/note_list.html +++ b/radis/notes/templates/notes/note_list.html @@ -4,7 +4,10 @@

Notes

{% endblock heading %} {% block content %} -
{% crispy filter.form %}
+
+
{% crispy filter.form %}
+
{% crispy page_size_select %}
+
{% for note in notes %} {% include "notes/_note_list_item.html" %} {% empty %} diff --git a/radis/notes/views.py b/radis/notes/views.py index 955d773d..7043b7fb 100644 --- a/radis/notes/views.py +++ b/radis/notes/views.py @@ -21,6 +21,7 @@ class NoteListView(LoginRequiredMixin, PageSizeSelectMixin, FilterView): context_object_name = "notes" filterset_class = NoteFilter paginate_by = 10 + page_sizes = [10, 25, 50] request: AuthenticatedHttpRequest def get_queryset(self) -> QuerySet[Note]: