From 987a6d3c553dbfdfc37bfc9f0f656d107c74f85e Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 22 Jun 2020 23:03:32 +0200 Subject: Download docs, better preview --- server/templates/server/doc_list.html | 205 ++++++++++++++++++++--- server/templates/server/download_doc.html | 265 ++++++++++++++++++++++++++++++ 2 files changed, 451 insertions(+), 19 deletions(-) create mode 100644 server/templates/server/download_doc.html (limited to 'server/templates') diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html index 8a6be37..961b9ab 100644 --- a/server/templates/server/doc_list.html +++ b/server/templates/server/doc_list.html @@ -128,12 +128,19 @@ {{doc.0.user.first_name}} {{doc.0.user.last_name}}
+ {% if doc.0.status == "ok" or doc.0.status == 'archive' %} + file_download Scarica documento +
+
+ {% endif %}
    + {% if doc.0.status == 'ok' or doc.0.status == 'archive' %}
  • - confirmation_numberDEBUG {{doc.0.code}} + confirmation_number{{doc.0.code}}
  • + {% endif %}
  • send{{doc.0.compilation_date}} @@ -145,15 +152,64 @@ personDati personali
    - - - {% for field in doc.2 %} - - - - {% endfor %} - -
    {{field}}
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
  • {% endif %} @@ -163,15 +219,126 @@ healingDati medici
- - - {% for field in doc.3 %} - - - - {% endfor %} - -
{{field}}
+
+
+
Persona di contatto in caso di necessità
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
Assicurazione
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ È sostenitore REGA   + +
+
+
+
+
Medico di famiglia
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
Scheda medica personale
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ Deve assumere regolarmente medicamenti   + +
+
+ + +
+
+ Informazioni particolari sullo stato di salute: (postumi di operazioni, incidenti, malattie, disturbi fisici)   + +
+
+ + +
{% endif %} diff --git a/server/templates/server/download_doc.html b/server/templates/server/download_doc.html new file mode 100644 index 0000000..0f36372 --- /dev/null +++ b/server/templates/server/download_doc.html @@ -0,0 +1,265 @@ +{% extends 'registration/base_custom.html' %} + +{% block title %}Admin - Documenti{% endblock %} + +{% block content %} +
    +
  • +
    + {% if doc.0.status == "wait" %} + timelapse + {% elif doc.0.status == "ok" %} + check + {% elif doc.0.status == "archive" %} + archive + {% elif doc.0.status == "autosign" %} + assignment_turned_in + {% endif %} + {{doc.0.document_type.name}} + {{doc.0.compilation_date}} +
    +
    +
      + {% if doc.0.status == 'ok' or doc.0.status == 'archive' %} +
    • +
      + confirmation_number{{doc.0.code}} +
      +
    • + {% endif %} +
    • +
      + send{{doc.0.compilation_date}} +
      +
    • + {% if doc.0.document_type.personal_data %} +
    • +
      + personDati personali +
      +
      +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      +
      +
    • + {% endif %} + {% if doc.0.document_type.medical_data %} +
    • +
      + healingDati medici +
      +
      +
      +
      +
      Persona di contatto in caso di necessità
      +
      +
      +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      +
      +
      +
      Assicurazione
      +
      +
      +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      +
      +
      + È sostenitore REGA   + +
      +
      +
      +
      +
      Medico di famiglia
      +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      +
      +
      +
      Scheda medica personale
      +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + Deve assumere regolarmente medicamenti   + +
      +
      + + +
      +
      + Informazioni particolari sullo stato di salute: (postumi di operazioni, incidenti, malattie, disturbi fisici)   + +
      +
      + + +
      +
      +
    • + {% endif %} + {% if doc.0.document_type.custom_data %} +
    • +
      + add_circle_outlineDati aggiuntivi +
      +
      + + + {% for key in doc.1 %} + + + + + {% endfor %} + +
      {{key.key}}{{key.value}}
      +
      +
    • + {% endif %} +
    +
    +
  • +
+ +{% endblock %} + +{%block script%} +document.addEventListener('DOMContentLoaded', function() { + var elems = document.querySelectorAll('.collapsible'); + var options = { + accordion: false + } + var instances = M.Collapsible.init(elems, options); + }); +{% endblock %} \ No newline at end of file -- cgit v1.2.1