diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-06-20 23:32:55 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-06-20 23:32:55 +0200 |
commit | 26fb6c43a27c014383127d0e4b3fb29f8b923690 (patch) | |
tree | 05fd542c342cf12cac72b49e5b4b44db7411d91a /server/templates | |
parent | Document custom field (diff) | |
download | scout-subs-26fb6c43a27c014383127d0e4b3fb29f8b923690.tar.gz scout-subs-26fb6c43a27c014383127d0e4b3fb29f8b923690.zip |
Doc, doctypes, users all done
Diffstat (limited to 'server/templates')
-rw-r--r-- | server/templates/server/doc_create.html (renamed from server/templates/server/doc_edit.html) | 19 | ||||
-rw-r--r-- | server/templates/server/doc_list.html | 72 | ||||
-rw-r--r-- | server/templates/server/doc_type.html | 59 | ||||
-rw-r--r-- | server/templates/server/index.html | 17 |
4 files changed, 123 insertions, 44 deletions
diff --git a/server/templates/server/doc_edit.html b/server/templates/server/doc_create.html index 8b01c35..6454bee 100644 --- a/server/templates/server/doc_edit.html +++ b/server/templates/server/doc_create.html @@ -1,12 +1,12 @@ {% extends 'registration/base.html' %} -{% block title %}Admin - Modifica Tipo{% endblock %} +{% block title %}Admin - Crea Tipo{% endblock %} {% block nav %} <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a> <a href="{% url 'server'%}" class="breadcrumb hide-on-med-and-down">Admin</a> <a href="{% url 'doctype' %}" class="breadcrumb hide-on-med-and-down">Tipo Doc</a> - <a href="#!" class="breadcrumb hide-on-med-and-down">Modifica Doc</a> + <a href="#!" class="breadcrumb hide-on-med-and-down">Crea Tipo</a> {% endblock %} {% block content %} @@ -14,11 +14,11 @@ <div class="col l8 offset-l2 s12"> <div class="card-panel"> <div class="row"> - <form id="form" action="{% url 'docedit'%}" method="post" class="col s12"> + <form id="form" action="{% url 'doccreate'%}" method="post" class="col s12"> {% csrf_token %} <div class="row"> <div class="input-field col s12"> - <input name="name" value="{{name}}" id="name" type="text" class="validate"> + <input name="name" value="{{name}}" id="name" type="text"> <label for="name">Nome</label> </div> </div> @@ -39,6 +39,17 @@ Privato </label> </div> + <div class="switch col s3"> + <label> + Richiede firma + </label> + <label> + No + <input name="sign" type="checkbox" {{sign_check}}> + <span class="lever"></span> + Si + </label> + </div> </div> <div class="row"> <div class="input-field col s2"> diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html index c5978b1..0b3d800 100644 --- a/server/templates/server/doc_list.html +++ b/server/templates/server/doc_list.html @@ -51,36 +51,68 @@ <i class="material-icons">archive</i> {% endif %} {{doc.0.document_type.name}} - <span class="badge" data-badge-caption="">{{doc.0.user.username}}</span></div> + <span class="badge" data-badge-caption="">{{doc.0.user.username}}</span> </div> <div class="collapsible-body"><span> {{doc.0.code}} <br> {{doc.0.compilation_date}}<br> + <ul class="collapsible"> {% if doc.0.document_type.personal_data %} - <i class="material-icons">person</i> + <li> + <div class="collapsible-header"> + <i class="material-icons">person</i>Dati personali + </div> + <div class="collapsible-body"><span> + <table class="striped"> + <tbody> + {% for field in doc.2 %} + <tr> + <td>{{field}}</td> + </tr> + {% endfor %} + </tbody> + </table> + </span></div> + </li> {% endif %} {% if doc.0.document_type.medical_data %} - <i class="material-icons">healing</i> - {% endif %} - {% if doc.0.document_type.custom_message %} - <i class="material-icons">message</i> - {% endif %} - {% if doc.0.document_type.custom_data %} - <i class="material-icons">add_circle_outline</i> + <li> + <div class="collapsible-header"> + <i class="material-icons">healing</i>Dati medici + </div> + <div class="collapsible-body"><span> + <table class="striped"> + <tbody> + {% for field in doc.3 %} + <tr> + <td>{{field}}</td> + </tr> + {% endfor %} + </tbody> + </table> + </span></div> + </li> {% endif %} {% if doc.0.document_type.custom_data %} - <br> - <table class="striped"> - <tbody> - {% for key in doc.1 %} - <tr> - <td>{{key.key}}</td> - <td>{{key.value}}</td> - </tr> - {% endfor %} - </tbody> - </table> + <li> + <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> {% endif %} + </ul> </span></div> </li> {% endfor %} diff --git a/server/templates/server/doc_type.html b/server/templates/server/doc_type.html index fecfc9d..15ac30e 100644 --- a/server/templates/server/doc_type.html +++ b/server/templates/server/doc_type.html @@ -48,41 +48,64 @@ {% if not doctype.0.group_private %} <i class="material-icons">public</i> {% endif %} + {% if doctype.0.auto_sign %} + <i class="material-icons">assignment_turned_in</i> + {% endif %} {{doctype.0.name}} - <span class="new badge red lighten-1" data-badge-caption="">{{doctype.2}}</span></div> + <span class="new badge red lighten-1" data-badge-caption="">{{doctype.2}}</span> </div> <div class="collapsible-body"><span> + <ul class="collapsible"> {% if doctype.0.personal_data %} - <i class="material-icons">person</i> + <li> + <div class="collapsible-header"> + <i class="material-icons">person</i>Dati personali + </div> + </li> {% endif %} {% if doctype.0.medical_data %} - <i class="material-icons">healing</i> - {% endif %} - {% if doctype.0.custom_data %} - <i class="material-icons">add_circle_outline</i> - {% endif %} - {% if doctype.0.custom_message %} - <i class="material-icons">message</i> + <li> + <div class="collapsible-header"> + <i class="material-icons">healing</i>Dati medici + </div> + </li> {% endif %} {% if doctype.0.custom_data %} - <br> - <ul class="collection"> - {% for key in doctype.1 %} - <li class="collection-item">{{key.key}}</li> - {% endfor %} - </ul> + <li> + <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 doctype.1 %} + <tr> + <td>{{key.key}}</td> + </tr> + {% endfor %} + </tbody> + </table> + </span></div> + </li> {% endif %} {% if doctype.0.custom_message %} - <br> - {{doctype.0.custom_message_text}} + <li> + <div class="collapsible-header"> + <i class="material-icons">message</i>Messaggio aggiuntivo + </div> + <div class="collapsible-body"><span> + {{doctype.0.custom_message_text}} + </span></div> + </li> {% endif %} + </ul> </span></div> </li> {% endfor %} </ul> </form> <div class="fixed-action-btn"> - <a class="btn-floating btn-large red lighten-1" href="{% url 'docedit'%}"> + <a class="btn-floating btn-large red lighten-1" href="{% url 'doccreate'%}"> <i class="large material-icons">add</i> </a> </div> diff --git a/server/templates/server/index.html b/server/templates/server/index.html index d88454f..199feb5 100644 --- a/server/templates/server/index.html +++ b/server/templates/server/index.html @@ -40,8 +40,21 @@ <div class="col l6 s12"> <div class="card large"> <div class="card-content"> - <p>I am a very simple card. I am good at containing small bits of information. - I am convenient because I require little markup to use effectively.</p> + <ul class="collapsible"> + {% for doctype in docs %} + <li> + <div class="collapsible-header"> + {% if not doctype.0.enabled %} + <i class="material-icons">visibility_off</i> + {% endif %} + {% if not doctype.0.group_private %} + <i class="material-icons">public</i> + {% endif %} + {{doctype.0.name}} + <span class="new badge red lighten-1" data-badge-caption="">{{doctype.1}}</span> + </div> + {% endfor %} + </ul> </div> <div class="card-action"> <a href="{% url 'doctype' %}">Lista tipo doc</a> |