From 859c156921153ed158ac3e1e90b32ab10f214d94 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 24 Jul 2023 17:20:39 +0200 Subject: improve index show multiple peoples --- client/templates/client/index.html | 757 +++++++++++++++++++------------------ client/views.py | 6 - 2 files changed, 384 insertions(+), 379 deletions(-) (limited to 'client') diff --git a/client/templates/client/index.html b/client/templates/client/index.html index 443308a..0b0b25c 100644 --- a/client/templates/client/index.html +++ b/client/templates/client/index.html @@ -16,411 +16,422 @@ -{% if user.is_staff or perms.client.approved %} - + + + +{% endfor %} {% else %}
@@ -443,7 +454,7 @@ $(document).ready(function(){ $('.collapsible').collapsible(); $('.tap-target').tapTarget(); $('.modal').modal(); - {% if empty %} + {% if docs|length == 0 %} $('.tap-target').tapTarget('open'); {% endif %} var params = {}; diff --git a/client/views.py b/client/views.py index 4404cb5..dfb5dbf 100644 --- a/client/views.py +++ b/client/views.py @@ -40,8 +40,6 @@ def index(request): # the user has no person return render(request, 'client/index.html', {}) - groups = request.user.groups.all() - # user action if request.method == "POST": # get document id @@ -104,12 +102,8 @@ def index(request): health_file = ["/server/media/", "/health_care_certificate/doc"] sign_doc_file = ["/server/media/", "/signed_doc/doc"] - print(docs) - context = { "docs": docs, - "base_group": groups[0].name, - "empty": len(docs) == 0, "vac_file": vac_file, "health_file": health_file, "sign_doc_file": sign_doc_file -- cgit v1.2.1