From aa98c4848d739dd03a95fb1cd0e6bf6faf080acf Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Fri, 21 Aug 2020 23:11:25 +0200 Subject: [PATCH] Create base template for search page --- apps/member/templates/member/user_list.html | 67 ++------------------ note_kfet/templates/base_search.html | 69 +++++++++++++++++++++ 2 files changed, 73 insertions(+), 63 deletions(-) create mode 100644 note_kfet/templates/base_search.html diff --git a/apps/member/templates/member/user_list.html b/apps/member/templates/member/user_list.html index 66aecf3a..ce0b14a7 100644 --- a/apps/member/templates/member/user_list.html +++ b/apps/member/templates/member/user_list.html @@ -1,10 +1,8 @@ -{% extends "base.html" %} +{% extends "base_search.html" %} {% comment %} SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} -{% load render_table from django_tables2 %} -{% load i18n crispy_forms_tags perms %} -{% block contenttitle %}{% endblock %} +{% load i18n perms %} {% block content %} {% if "member.change_profile_registration_valid"|has_perm:user %} @@ -13,63 +11,6 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endif %} -
-

- {{ title }} -

-
- -
-
-
- {% if table.data %} - {% render_table table %} - {% else %} -
- {% trans "There is no user with this pattern." %} -
- {% endif %} -
-
-
+{# Search panel #} +{{ block.super }} {% endblock %} - -{% block extrajavascript %} - -{% endblock %} \ No newline at end of file diff --git a/note_kfet/templates/base_search.html b/note_kfet/templates/base_search.html new file mode 100644 index 00000000..1c588114 --- /dev/null +++ b/note_kfet/templates/base_search.html @@ -0,0 +1,69 @@ +{% extends "base.html" %} +{% comment %} +SPDX-License-Identifier: GPL-3.0-or-later +{% endcomment %} +{% load render_table from django_tables2 %} +{% load i18n perms %} +{% block contenttitle %}{% endblock %} + +{% block content %} +
+

+ {{ title }} +

+
+ +
+
+ {% if table.data %} + {% render_table table %} + {% else %} +
+
+ {% trans "There is no results." %} +
+
+ {% endif %} +
+
+{% endblock %} + +{% block extrajavascript %} + +{% endblock %}