diff options
Diffstat (limited to 'server/templates')
-rw-r--r-- | server/templates/server/doc_edit.html | 79 | ||||
-rw-r--r-- | server/templates/server/doc_list.html | 70 | ||||
-rw-r--r-- | server/templates/server/doc_type.html | 70 | ||||
-rw-r--r-- | server/templates/server/index.html | 3 |
4 files changed, 221 insertions, 1 deletions
diff --git a/server/templates/server/doc_edit.html b/server/templates/server/doc_edit.html new file mode 100644 index 0000000..cca0607 --- /dev/null +++ b/server/templates/server/doc_edit.html @@ -0,0 +1,79 @@ +{% extends 'registration/base.html' %} + +{% block title %}Admin - Modifica 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> +{% endblock %} + +{% block content %} +<div class="row"> + <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"> + {% csrf_token %} + <div class="row"> + <div class="input-field col s12"> + <input name="name" value="{{name}}" id="name" type="text" class="validate"> + <label for="name">Nome</label> + </div> + </div> + <div class="row"> + <div class="switch col s3"> + <label> + Disabilitato + <input name="enabled" type="checkbox" {{enabled_check}}> + <span class="lever"></span> + Abilitato + </label> + </div> + <div class="switch col s3"> + <label> + Publico + <input name="group_private" type="checkbox" {{private_check}}> + <span class="lever"></span> + Privato + </label> + </div> + </div> + <div class="row"> + <div class="input-field col s3"> + <label> + <input name="personal_data" type="checkbox" class="filled-in" {{personal_check}}/> + <span>Dati personali</span> + </label> + </div> + <div class="input-field col s3"> + <label> + <input name="medical_data" type="checkbox" class="filled-in" {{medical_check}} /> + <span>Dati medici</span> + </label> + </div> + <div class="input-field col s3"> + <label> + <input name="custom_data" type="checkbox" class="filled-in" {{custom_check}}/> + <span>Parametri personalizzati</span> + </label> + </div> + </div> + <div class="row"> + <div class="input-field col s12"> + <textarea name="custom" id="textarea" class="materialize-textarea"></textarea> + <label for="textarea">Lista parametri personalizzati, uno per riga</label> + </div> + </div> + <div class="fixed-action-btn"> + <a class="btn-floating btn-large red lighten-1" onclick="document.getElementById('form').submit()"> + <i class="large material-icons">save</i> + </a> + </div> + </form> + </div> + </div> + </div> +</div> +{% endblock %}
\ No newline at end of file diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html new file mode 100644 index 0000000..cf98010 --- /dev/null +++ b/server/templates/server/doc_list.html @@ -0,0 +1,70 @@ +{% extends 'registration/base_custom.html' %} + +{% block title %}Admin - Documenti{% endblock %} + +{% block nav %} + <nav> + <div class="nav-wrapper red lighten-1"> + <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">Documenti</a> + <ul class="right"> + {% if user.is_staff %} + <li><a onclick="document.getElementById('selection').submit()">Elimina selezionati</a></li> + <li><a href="{% url 'server' %}">Pannello Admin</a></li> + {% endif %} + {% if user.is_authenticated %} + <li><a href="{% url 'personal' %}">{{ user.username }}</a></li> + {% endif %} + {% if user.username != "" %} + <li> + <a href="{% url 'logout' %}"><i class="material-icons">exit_to_app</i></a> + </li> + {% else %} + <li><a href="{% url 'signup' %}">Registrazione</a></li> + <li><a href="{% url 'login' %}">Login</a></li> + {% endif %} + </ul> + </div> + </nav> +{% endblock %} + +{% block content %} +<form id="selection" action="{% url 'doctype' %}" method="post"> +{% csrf_token %} +<ul class="collapsible"> + {% for doc in docs %} + <li> + <div class="collapsible-header"> + <label> + <input name={{doc.id}} type="checkbox" class="filled-in"/> + <span></span> + </label> + {% if doc.enabled %} + <i class="material-icons">visibility_on</i> + {% else %} + <i class="material-icons">visibility_off</i> + {% endif %} + {{doc.document_type.name}} + </div> + <div class="collapsible-body"><span> + {% for key in keys %} + {{key}}<br> + {% endfor %} + </span></div> + </li> + {% endfor %} +</ul> +</form> +<div class="fixed-action-btn"> + <a class="btn-floating btn-large red lightend-1" href="{% url 'docedit'%}"> + <i class="large material-icons">add</i> + </a> +</div> +{% endblock %} + +{%block script%} +$(document).ready(function(){ + $('.collapsible').collapsible(); +}); +{% endblock %}
\ No newline at end of file diff --git a/server/templates/server/doc_type.html b/server/templates/server/doc_type.html new file mode 100644 index 0000000..75bb79a --- /dev/null +++ b/server/templates/server/doc_type.html @@ -0,0 +1,70 @@ +{% extends 'registration/base_custom.html' %} + +{% block title %}Admin - Tipo Documenti{% endblock %} + +{% block nav %} + <nav> + <div class="nav-wrapper red lighten-1"> + <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> + <ul class="right"> + {% if user.is_staff %} + <li><a onclick="document.getElementById('selection').submit()">Elimina selezionati</a></li> + <li><a href="{% url 'server' %}">Pannello Admin</a></li> + {% endif %} + {% if user.is_authenticated %} + <li><a href="{% url 'personal' %}">{{ user.username }}</a></li> + {% endif %} + {% if user.username != "" %} + <li> + <a href="{% url 'logout' %}"><i class="material-icons">exit_to_app</i></a> + </li> + {% else %} + <li><a href="{% url 'signup' %}">Registrazione</a></li> + <li><a href="{% url 'login' %}">Login</a></li> + {% endif %} + </ul> + </div> + </nav> +{% endblock %} + +{% block content %} +<form id="selection" action="{% url 'doctype' %}" method="post"> +{% csrf_token %} +<ul class="collapsible"> + {% for doctype in docs %} + <li> + <div class="collapsible-header"> + <label> + <input name={{doctype.id}} type="checkbox" class="filled-in"/> + <span></span> + </label> + {% if doctype.enabled %} + <i class="material-icons">visibility_on</i> + {% else %} + <i class="material-icons">visibility_off</i> + {% endif %} + {{doctype.name}} + </div> + <div class="collapsible-body"><span> + {% for key in keys %} + {{key}}<br> + {% endfor %} + </span></div> + </li> + {% endfor %} +</ul> +</form> +<div class="fixed-action-btn"> + <a class="btn-floating btn-large red lightend-1" href="{% url 'docedit'%}"> + <i class="large material-icons">add</i> + </a> +</div> +{% endblock %} + +{%block script%} +$(document).ready(function(){ + $('.collapsible').collapsible(); +}); +{% endblock %}
\ No newline at end of file diff --git a/server/templates/server/index.html b/server/templates/server/index.html index 37a553b..4095d4a 100644 --- a/server/templates/server/index.html +++ b/server/templates/server/index.html @@ -44,7 +44,8 @@ I am convenient because I require little markup to use effectively.</p> </div> <div class="card-action"> - <a href="{% url 'ulist' %}">Lista documenti</a> + <a href="{% url 'doctype' %}">Lista tipo doc</a> + <a href="{% url 'doclist' %}">Lista documenti</a> <a href="{% url 'uapprove' %}">Approva documento</a> </div> </div> |