From 9f474d32ef47b02868a31bd59eaf969087d67a16 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Thu, 19 Aug 2021 12:19:41 +0200 Subject: use query instead of for loop in client --- client/templates/client/doc_create.html | 4 +- client/templates/client/doc_edit.html | 4 +- client/templates/client/index.html | 151 +++++++++++++++----------------- 3 files changed, 77 insertions(+), 82 deletions(-) (limited to 'client/templates') diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html index 04f08e6..2f70ef3 100644 --- a/client/templates/client/doc_create.html +++ b/client/templates/client/doc_create.html @@ -109,8 +109,8 @@ {% for key in keys %}
- - + +
{% endfor %} diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html index f7e8f72..a622ea8 100644 --- a/client/templates/client/doc_edit.html +++ b/client/templates/client/doc_edit.html @@ -65,8 +65,8 @@ {% for key in keys %}
- - + +
{% endfor %} diff --git a/client/templates/client/index.html b/client/templates/client/index.html index 092fe7f..1117cba 100644 --- a/client/templates/client/index.html +++ b/client/templates/client/index.html @@ -3,6 +3,7 @@ {% block title %}Home{% endblock %} {% block content %} +{% load app_filter %}
Aggiungi un'iscrizione
@@ -34,49 +35,49 @@ {% for doc in docs %}
  • - {% if doc.0.status == "wait" %} + {% if doc.status == "wait" %} timelapse - {% elif doc.0.status == "ok" %} + {% elif doc.status == "ok" %} check - {% elif doc.0.status == "autosign" %} + {% elif doc.status == "autosign" %} assignment_turned_in {% endif %} - {{doc.0.document_type.name}} - {{doc.0.compilation_date}} + {{doc.document_type.name}} + {{doc.compilation_date}}
    - {% if doc.0.status == "wait" %} + {% if doc.status == "wait" %}

    - {% elif doc.0.status == "autosign" %} - @@ -273,52 +274,52 @@
    Scheda medica personale
    - +
    - +
    - +
    - +
    Deve assumere regolarmente medicamenti  
    - +
    Informazioni particolari sullo stato di salute: (postumi di operazioni, incidenti, malattie, disturbi fisici)  
    - +
  • {% endif %} {% endif %} - {% if doc.0.document_type.custom_data %} + {% if doc.document_type.custom_data %}
  • add_circle_outlineDati aggiuntivi @@ -326,7 +327,7 @@
    - {% for key in doc.1 %} + {% for key in doc|doc_key %} @@ -337,31 +338,26 @@ {% endif %} - {% if doc.0.document_type.medical_data %}
  • - {% if doc.0.medical_data %} - attach_fileAllegati - {% else %} - attach_fileAllegati - {% endif %} + attach_fileAllegati
    - {% if doc.0.medical_data %}
    - {% if doc.5 %} {% endif %} + {% if doc.signed_doc %} {% endif %}
    + {% if doc.medical_data %}
    - {% if doc.6 %}{% endif %} + {% if doc.medical_data.health_care_certificate %}{% endif %}
    @@ -370,15 +366,14 @@
    - {% if doc.7 %}{% endif %} + {% if doc.medical_data.vac_certificate %}{% endif %}
    + {% endif %}
    - {% endif %}
  • - {% endif %} -- cgit v1.2.1
    {{key.key}} {{key.value}}