From ccc5d1f1b2cb4b5e2a95b97bbd1a5760ce585f08 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Sat, 20 Jun 2020 15:55:28 +0200 Subject: Document custom field --- server/templates/server/approve_doc.html | 43 ++++++++++++++++++++ server/templates/server/approve_user.html | 51 ++++++++++++++++-------- server/templates/server/doc_edit.html | 19 +++++++-- server/templates/server/doc_list.html | 65 +++++++++++++++++++++++-------- server/templates/server/doc_type.html | 52 ++++++++++++++++++++----- server/templates/server/index.html | 2 +- 6 files changed, 184 insertions(+), 48 deletions(-) create mode 100644 server/templates/server/approve_doc.html (limited to 'server/templates') diff --git a/server/templates/server/approve_doc.html b/server/templates/server/approve_doc.html new file mode 100644 index 0000000..82ecf2a --- /dev/null +++ b/server/templates/server/approve_doc.html @@ -0,0 +1,43 @@ +{% extends 'registration/base.html' %} + +{% block title %}Admin - Approva Utente{% endblock %} + +{% block nav %} + Home + Admin + Approva Documento +{% endblock %} + +{% block content %} + +{% if not empty %} +
+
+
+
    + {% for i in messages %} +
  • {{ i }}
  • + {% endfor %} +
+
+
+
+{% endif %} + +
+
+
+
+ {% csrf_token %} +
+

Inserire un codice per riga

+ +
+
+ Invia +
+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/server/templates/server/approve_user.html b/server/templates/server/approve_user.html index 126c0b9..9d4b36c 100644 --- a/server/templates/server/approve_user.html +++ b/server/templates/server/approve_user.html @@ -3,24 +3,41 @@ {% block title %}Admin - Approva Utente{% endblock %} {% block nav %} - Home - Admin - Approva Utente + Home + Admin + Approva Utente {% endblock %} {% block content %} -

Inserire un codice per riga

- -
- {% csrf_token %} - -

- -
+ +{% if not empty %} +
+
+
+
    + {% for i in messages %} +
  • {{ i }}
  • + {% endfor %} +
+
+
+
+{% endif %} + +
+
+
+
+ {% csrf_token %} +
+

Inserire un codice per riga

+ +
+
+ Invia +
+
+
+
+
{% endblock %} \ No newline at end of file diff --git a/server/templates/server/doc_edit.html b/server/templates/server/doc_edit.html index cca0607..8b01c35 100644 --- a/server/templates/server/doc_edit.html +++ b/server/templates/server/doc_edit.html @@ -41,31 +41,44 @@
-
+
-
+
-
+
+
+ +
+
+
+
+ + +
+
save diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html index cf98010..c5978b1 100644 --- a/server/templates/server/doc_list.html +++ b/server/templates/server/doc_list.html @@ -7,10 +7,12 @@
- {% for key in keys %} - {{key}}
- {% endfor %} + {{doc.0.code}}
+ {{doc.0.compilation_date}}
+ {% if doc.0.document_type.personal_data %} + person + {% endif %} + {% if doc.0.document_type.medical_data %} + healing + {% endif %} + {% if doc.0.document_type.custom_message %} + message + {% endif %} + {% if doc.0.document_type.custom_data %} + add_circle_outline + {% endif %} + {% if doc.0.document_type.custom_data %} +
+ + + {% for key in doc.1 %} + + + + + {% endfor %} + +
{{key.key}}{{key.value}}
+ {% endif %}
{% endfor %} - {% endblock %} {%block script%} $(document).ready(function(){ $('.collapsible').collapsible(); }); +function send(id) { + var form = document.getElementById('selection') + var action = document.getElementById('action') + action.setAttribute('value', id); + form.submit() +} {% endblock %} \ No newline at end of file diff --git a/server/templates/server/doc_type.html b/server/templates/server/doc_type.html index 75bb79a..fecfc9d 100644 --- a/server/templates/server/doc_type.html +++ b/server/templates/server/doc_type.html @@ -10,7 +10,8 @@ Tipo Doc
    {% if user.is_staff %} -
  • Elimina selezionati
  • +
  • Nascondi/mostra selezionati
  • +
  • Elimina selezionati
  • Pannello Admin
  • {% endif %} {% if user.is_authenticated %} @@ -32,32 +33,56 @@ {% block content %}
    {% csrf_token %} +
      {% for doctype in docs %}
    • - {% if doctype.enabled %} - visibility_on - {% else %} + {% if not doctype.0.enabled %} visibility_off {% endif %} - {{doctype.name}} + {% if not doctype.0.group_private %} + public + {% endif %} + {{doctype.0.name}} + {{doctype.2}}
- {% for key in keys %} - {{key}}
- {% endfor %} + {% if doctype.0.personal_data %} + person + {% endif %} + {% if doctype.0.medical_data %} + healing + {% endif %} + {% if doctype.0.custom_data %} + add_circle_outline + {% endif %} + {% if doctype.0.custom_message %} + message + {% endif %} + {% if doctype.0.custom_data %} +
+
    + {% for key in doctype.1 %} +
  • {{key.key}}
  • + {% endfor %} +
+ {% endif %} + {% if doctype.0.custom_message %} +
+ {{doctype.0.custom_message_text}} + {% endif %}
{% endfor %} @@ -67,4 +92,11 @@ $(document).ready(function(){ $('.collapsible').collapsible(); }); + +function send(id) { + var form = document.getElementById('selection') + var action = document.getElementById('action') + action.setAttribute('value', id); + form.submit() +} {% endblock %} \ No newline at end of file diff --git a/server/templates/server/index.html b/server/templates/server/index.html index 4095d4a..d88454f 100644 --- a/server/templates/server/index.html +++ b/server/templates/server/index.html @@ -46,7 +46,7 @@
-- cgit v1.2.1