aboutsummaryrefslogtreecommitdiffstats
path: root/server/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-08-29 13:56:55 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-08-29 13:56:55 +0200
commit72ff25d3e85e11c350940cafd7dc4e84deb0b4bf (patch)
treeac612b56a1b782a286c61287321a6704ed228367 /server/templates
parentsimpler design for document download (diff)
downloadscout-subs-72ff25d3e85e11c350940cafd7dc4e84deb0b4bf.tar.gz
scout-subs-72ff25d3e85e11c350940cafd7dc4e84deb0b4bf.zip
even simpler doc preview
Diffstat (limited to 'server/templates')
-rw-r--r--server/templates/server/download_doc.html488
1 files changed, 231 insertions, 257 deletions
diff --git a/server/templates/server/download_doc.html b/server/templates/server/download_doc.html
index 7ad296b..9fe106e 100644
--- a/server/templates/server/download_doc.html
+++ b/server/templates/server/download_doc.html
@@ -8,283 +8,266 @@
</head>
<body>
<main style="margin-left: 10px;margin-right: 10px;margin-top: 10px;">
- <ul class="collapsible">
- <li>
- <div class="collapsible-header">
- {% if doc.0.status == "wait" %}
- <i class="material-icons">timelapse</i>
- {% elif doc.0.status == "ok" %}
- <i class="material-icons">check</i>
- {% elif doc.0.status == "archive" %}
- <i class="material-icons">archive</i>
- {% elif doc.0.status == "autosign" %}
- <i class="material-icons">assignment_turned_in</i>
- {% endif %}
- {{doc.0.document_type.name}}
- <span class="badge" data-badge-caption="">{{doc.0.user.username}}</span>
- </div>
- </li>
- {% if doc.0.status == 'ok' or doc.0.status == 'archive' %}
- <li>
- <div class="collapsible-header">
- <i class="material-icons">confirmation_number</i>{{doc.0.code}}
- </div>
+ <ul class="collection">
+ <li class="collection-item">
+ {% if doc.0.status == "wait" %}
+ <i class="material-icons left">timelapse</i>
+ {% elif doc.0.status == "ok" %}
+ <i class="material-icons left">check</i>
+ {% elif doc.0.status == "archive" %}
+ <i class="material-icons left">archive</i>
+ {% elif doc.0.status == "autosign" %}
+ <i class="material-icons left">assignment_turned_in</i>
+ {% endif %}
+ {{doc.0.document_type.name}}
+ <span class="badge" data-badge-caption="">{{doc.0.user.username}}</span>
</li>
- {% endif %}
- <li>
- <div class="collapsible-header">
- <i class="material-icons">send</i>{{doc.0.compilation_date}}
- </div>
+ {% if doc.0.status == 'ok' or doc.0.status == 'archive' %}
+ <li class="collection-item">
+ <i class="material-icons left">confirmation_number</i>{{doc.0.code}}
+ </li>
+ {% endif %}
+ <li class="collection-item">
+ <i class="material-icons left">send</i>{{doc.0.compilation_date}}
</li>
{% if doc.0.document_type.personal_data %}
- <li class="active">
- <div class="collapsible-header">
- <i class="material-icons">person</i>Dati personali
- </div>
- <div class="collapsible-body"><span>
- <div class="row">
- <div class="input-field col l4 s12">
- <input value="{{doc.0.user.first_name}}" id="first_name" type="text" >
- <label for="first_name">Nome</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.0.user.last_name}}" id="last_name" type="text" >
- <label for="last_name">Cognome</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.2.born_date}}" id="birth_date" type="text">
- <label for="birth_date">Data di nascita</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.4}}" id="branca" type="text">
- <label for="branca">Branca</label>
- </div>
- <div class="input-field col l8 s12">
- <input value="{{doc.2.parent_name}}" id="parent_name" type="text" >
- <label for="parent_name">Nome dei genitori</label>
- </div>
- <div class="input-field col l12 s12">
- <input value="{{doc.2.via}}" id="via" type="text" >
- <label for="via">Via e numero</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.2.cap}}" name="cap" id="cap" type="text" >
- <label for="cap">CAP</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.2.country}}" name="country" id="country" type="text" >
- <label for="country">Paese</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.2.nationality}}" name="nationality" id="nationality" type="text" >
- <label for="nationality">Nazionalit&agrave;</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.2.phone}}" name="phone" id="phone" type="text" >
- <label for="phone">Cellulare</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.2.home_phone}}" name="home_phone" id="home_phone" type="text" >
- <label for="home_phone">Telefono di casa</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.2.email}}" name="email" id="email" type="text" >
- <label for="email">Email</label>
- </div>
- <div class="input-field col l8 s12">
- <input value="{{doc.2.school}}" name="school" id="school" type="text" >
- <label for="school">Scuola frequentata</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.2.year}}" name="year" id="year" type="text" >
- <label for="year">Classe</label>
- </div>
+ <li class="collection-item">
+ <i class="material-icons left">person</i>Dati personali
+ <br><br>
+ <div class="row">
+ <div class="input-field col l4 s12">
+ <input value="{{doc.0.user.first_name}}" id="first_name" type="text" >
+ <label for="first_name">Nome</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.0.user.last_name}}" id="last_name" type="text" >
+ <label for="last_name">Cognome</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.2.born_date}}" id="birth_date" type="text">
+ <label for="birth_date">Data di nascita</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.4}}" id="branca" type="text">
+ <label for="branca">Branca</label>
</div>
- </span></div>
+ <div class="input-field col l8 s12">
+ <input value="{{doc.2.parent_name}}" id="parent_name" type="text" >
+ <label for="parent_name">Nome dei genitori</label>
+ </div>
+ <div class="input-field col l12 s12">
+ <input value="{{doc.2.via}}" id="via" type="text" >
+ <label for="via">Via e numero</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.2.cap}}" name="cap" id="cap" type="text" >
+ <label for="cap">CAP</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.2.country}}" name="country" id="country" type="text" >
+ <label for="country">Paese</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.2.nationality}}" name="nationality" id="nationality" type="text" >
+ <label for="nationality">Nazionalit&agrave;</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.2.phone}}" name="phone" id="phone" type="text" >
+ <label for="phone">Cellulare</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.2.home_phone}}" name="home_phone" id="home_phone" type="text" >
+ <label for="home_phone">Telefono di casa</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.2.email}}" name="email" id="email" type="text" >
+ <label for="email">Email</label>
+ </div>
+ <div class="input-field col l8 s12">
+ <input value="{{doc.2.school}}" name="school" id="school" type="text" >
+ <label for="school">Scuola frequentata</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.2.year}}" name="year" id="year" type="text" >
+ <label for="year">Classe</label>
+ </div>
+ </div>
</li>
{% endif %}
{% if doc.0.document_type.medical_data %}
- <li class="active">
- <div class="collapsible-header">
- <i class="material-icons">healing</i>Dati medici
+ <li class="collection-item">
+ <i class="material-icons left">healing</i>Dati medici
+ <br><br>
+ <div class="row">
+ <div class="col s12">
+ <h6>Persona di contatto in caso di necessit&agrave;</h6>
+ </div>
</div>
- <div class="collapsible-body"><span>
- <div class="row">
- <div class="col s12">
- <h6>Persona di contatto in caso di necessit&agrave;</h6>
- </div>
+ <div class="row">
+ <div class="input-field col l6 s12">
+ <input name="emer_name" value="{{doc.3.emer_name}}" id="emer_name" type="text" >
+ <label for="emer_name">Nome e cognome</label>
</div>
- <div class="row">
- <div class="input-field col l6 s12">
- <input name="emer_name" value="{{doc.3.emer_name}}" id="emer_name" type="text" >
- <label for="emer_name">Nome e cognome</label>
- </div>
- <div class="input-field col l3 s12">
- <input name="emer_relative" value="{{doc.3.emer_relative}}" id="emer_relative" type="text" >
- <label for="emer_releative">Parentela</label>
- </div>
- <div class="input-field col l3 s12">
- <input name="cell_phone" value="{{doc.3.cell_phone}}" id="cellphone" type="text" >
- <label for="cell_phone">Cellulare</label>
- </div>
- <div class="input-field col l9 s12">
- <input value="{{doc.3.address}}" name="address" id="address" type="text" >
- <label for="address">Indirizzo completo</label>
- </div>
- <div class="input-field col l3 s12">
- <input value="{{doc.3.emer_phone}}" name="emer_phone" id="emer_phone" type="text" >
- <label for="emer_phone">Telefono di casa</label>
- </div>
+ <div class="input-field col l3 s12">
+ <input name="emer_relative" value="{{doc.3.emer_relative}}" id="emer_relative" type="text" >
+ <label for="emer_releative">Parentela</label>
</div>
- <div class="row">
- <div class="col s12">
- <h6>Assicurazione</h6>
- </div>
+ <div class="input-field col l3 s12">
+ <input name="cell_phone" value="{{doc.3.cell_phone}}" id="cellphone" type="text" >
+ <label for="cell_phone">Cellulare</label>
</div>
- <div class="row">
- <div class="input-field col l4 s12">
- <input value="{{doc.3.health_care}}" name="health_care" id="health_care" type="text" >
- <label for="health_care">Cassa Malati</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.3.injuries}}" name="injuries" id="injuries" type="text" >
- <label for="injuries">Infortuni</label>
- </div>
- <div class="input-field col l4 s12">
- <input value="{{doc.3.rc}}" name="rc" id="rc" type="text" >
- <label for="rc">Responsabilit&agrave; civile</label>
- </div>
+ <div class="input-field col l9 s12">
+ <input value="{{doc.3.address}}" name="address" id="address" type="text" >
+ <label for="address">Indirizzo completo</label>
</div>
- <div class="row">
- <div class="switch col s12">
- &Egrave; sostenitore REGA&nbsp;&nbsp;
- <label>
- No
- <input name="rega" type="checkbox" {% if doc.3.rega %}checked="checked"{%endif%}>
- <span class="lever"></span>
- Si
- </label>
- </div>
+ <div class="input-field col l3 s12">
+ <input value="{{doc.3.emer_phone}}" name="emer_phone" id="emer_phone" type="text" >
+ <label for="emer_phone">Telefono di casa</label>
</div>
- <div class="row">
- <div class="col s12">
- <h6>Medico di famiglia</h6>
- </div>
- <div class="input-field col l6 s12">
- <input value="{{doc.3.medic_name}}" name="medic_name" id="medic_name" type="text" >
- <label for="medic_name">Nome e cognome</label>
- </div>
- <div class="input-field col l6 s12">
- <input value="{{doc.3.medic_phone}}" name="medic_phone" id="medic_phone" type="text" >
- <label for="medic_phone">Telefono studio</label>
- </div>
- <div class="input-field col l12 s12">
- <input value="{{doc.3.medic_address}}" name="medic_address" id="medic_address" type="text" >
- <label for="medic_address">Indirizzo completo</label>
- </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <h6>Assicurazione</h6>
</div>
- <div class="row">
- <div class="col s12">
- <h6>Scheda medica personale</h6>
- </div>
- <div class="input-field col s12">
- <input value="{{doc.3.sickness}}" name="sickness" id="sickness" type="text">
- <label for="sickness">Principali malattie avute</label>
- </div>
- <div class="input-field col l8 s12">
- <input value="{{doc.3.vaccine}}" name="vaccine" id="vaccine" type="text">
- <label for="vaccine">Vacinazioni fatte</label>
- </div>
- <div class="input-field col l4 s12">
- <label for="tetanus_date">Ultima vacinazione contro il tetano</label>
- <input value="{{doc.3.tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text">
- </div>
- <div class="input-field col s12">
- <input value="{{doc.3.allergy}}" name="allergy" id="allergy" type="text">
- <label for="allergy">Allergie particolari/Intolleraze alimentari</label>
- </div>
- <div class="switch col s12">
- Deve assumere regolarmente medicamenti&nbsp;&nbsp;
- <label>
- No
- <input name="drugs_bool" type="checkbox" {% if doc.3.drugs_bool %}checked="checked"{%endif%}>
- <span class="lever"></span>
- Si
- </label>
- </div>
- <div class="input-field col s12">
- <input value="{{doc.3.drugs}}" name="drugs" id="drugs" type="text">
- <label for="drugs">Se s&igrave; quali, in che dosi e prescrizioni</label>
- </div>
- <div class="switch col s12">
- Informazioni particolari sullo stato di salute: (postumi di operazioni, incidenti, malattie, disturbi fisici)&nbsp;&nbsp;
- <label>
- No
- <input name="misc_bool" type="checkbox" {% if doc.3.misc_bool %}checked="checked"{%endif%}>
- <span class="lever"></span>
- Si
- </label>
- </div>
- <div class="input-field col s12">
- <input value="{{doc.3.misc}}" name="misc" id="misc" type="text">
- <label for="misc">Se s&igrave; quali</label>
- </div>
- </span></div>
+ </div>
+ <div class="row">
+ <div class="input-field col l4 s12">
+ <input value="{{doc.3.health_care}}" name="health_care" id="health_care" type="text" >
+ <label for="health_care">Cassa Malati</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.3.injuries}}" name="injuries" id="injuries" type="text" >
+ <label for="injuries">Infortuni</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input value="{{doc.3.rc}}" name="rc" id="rc" type="text" >
+ <label for="rc">Responsabilit&agrave; civile</label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="switch col s12">
+ &Egrave; sostenitore REGA&nbsp;&nbsp;
+ <label>
+ No
+ <input name="rega" type="checkbox" {% if doc.3.rega %}checked="checked"{%endif%}>
+ <span class="lever"></span>
+ Si
+ </label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <h6>Medico di famiglia</h6>
+ </div>
+ <div class="input-field col l6 s12">
+ <input value="{{doc.3.medic_name}}" name="medic_name" id="medic_name" type="text" >
+ <label for="medic_name">Nome e cognome</label>
+ </div>
+ <div class="input-field col l6 s12">
+ <input value="{{doc.3.medic_phone}}" name="medic_phone" id="medic_phone" type="text" >
+ <label for="medic_phone">Telefono studio</label>
+ </div>
+ <div class="input-field col l12 s12">
+ <input value="{{doc.3.medic_address}}" name="medic_address" id="medic_address" type="text" >
+ <label for="medic_address">Indirizzo completo</label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <h6>Scheda medica personale</h6>
+ </div>
+ <div class="input-field col s12">
+ <input value="{{doc.3.sickness}}" name="sickness" id="sickness" type="text">
+ <label for="sickness">Principali malattie avute</label>
+ </div>
+ <div class="input-field col l8 s12">
+ <input value="{{doc.3.vaccine}}" name="vaccine" id="vaccine" type="text">
+ <label for="vaccine">Vacinazioni fatte</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <label for="tetanus_date">Ultima vacinazione contro il tetano</label>
+ <input value="{{doc.3.tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text">
+ </div>
+ <div class="input-field col s12">
+ <input value="{{doc.3.allergy}}" name="allergy" id="allergy" type="text">
+ <label for="allergy">Allergie particolari/Intolleraze alimentari</label>
+ </div>
+ <div class="switch col s12">
+ Deve assumere regolarmente medicamenti&nbsp;&nbsp;
+ <label>
+ No
+ <input name="drugs_bool" type="checkbox" {% if doc.3.drugs_bool %}checked="checked"{%endif%}>
+ <span class="lever"></span>
+ Si
+ </label>
+ </div>
+ <div class="input-field col s12">
+ <input value="{{doc.3.drugs}}" name="drugs" id="drugs" type="text">
+ <label for="drugs">Se s&igrave; quali, in che dosi e prescrizioni</label>
+ </div>
+ <div class="switch col s12">
+ Informazioni particolari sullo stato di salute: (postumi di operazioni, incidenti, malattie, disturbi fisici)&nbsp;&nbsp;
+ <label>
+ No
+ <input name="misc_bool" type="checkbox" {% if doc.3.misc_bool %}checked="checked"{%endif%}>
+ <span class="lever"></span>
+ Si
+ </label>
+ </div>
+ <div class="input-field col s12">
+ <input value="{{doc.3.misc}}" name="misc" id="misc" type="text">
+ <label for="misc">Se s&igrave; quali</label>
+ </div>
+ </div>
</li>
{% endif %}
{% if doc.0.document_type.custom_data %}
- <li class="active">
- <div class="collapsible-header">
- <i class="material-icons">add_circle_outline</i>Dati aggiuntivi
- </div>
- <div class="collapsible-body"><span>
- <table class="striped">
- <tbody>
- {% for key in doc.1 %}
- <tr>
- <td>{{key.key}}</td>
- <td>{{key.value}}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </span></div>
+ <li class="collection-item">
+ <i class="material-icons left">add_circle_outline</i>Dati aggiuntivi
+ <br><br>
+ <table class="striped">
+ <tbody>
+ {% for key in doc.1 %}
+ <tr>
+ <td>{{key.key}}</td>
+ <td>{{key.value}}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
</li>
{% endif %}
{% if doc.0.document_type.medical_data %}
- <li class="active">
- <div class="collapsible-header">
- <i class="material-icons">attach_file</i>Allegati
- </div>
- <div class="collapsible-body"><span>
- <div class="row">
- <div class="col s12">
- <div class="card">
- <div class="card-image">
- {% if vac %}<img src="data:;base64,{{ vac }}">{% endif %}
- </div>
+ <li class="collection-item">
+ <i class="material-icons left">attach_file</i>Allegati
+ <br><br>
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ {% if vac %}<img src="data:;base64,{{ vac }}">{% endif %}
</div>
</div>
</div>
- <div class="row">
- <div class="col s12">
- <div class="card">
- <div class="card-image">
- {% if health %}<img src="data:;base64,{{ health }}">{% endif %}
- </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ {% if health %}<img src="data:;base64,{{ health }}">{% endif %}
</div>
</div>
</div>
- <div class="row">
- <div class="col s12">
- <div class="card">
- <div class="card-image">
- {% if sign_doc_file %}<img src="data:;base64,{{ sign_doc_file }}">{% endif %}
- </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ {% if sign_doc_file %}<img src="data:;base64,{{ sign_doc_file }}">{% endif %}
</div>
</div>
</div>
- </span></div>
+ </div>
</li>
{% endif %}
</ul>
@@ -292,13 +275,4 @@
</main>
</body>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
-<script>
-document.addEventListener('DOMContentLoaded', function() {
- var elems = document.querySelectorAll('.collapsible');
- var options = {
- accordion: false
- }
- var instances = M.Collapsible.init(elems, options);
-});
-</script>
</html> \ No newline at end of file