diff options
Diffstat (limited to '')
-rw-r--r-- | client/templates/client/doc_create.html | 42 | ||||
-rw-r--r-- | client/templates/client/index.html | 51 |
2 files changed, 93 insertions, 0 deletions
diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html new file mode 100644 index 0000000..a52518f --- /dev/null +++ b/client/templates/client/doc_create.html @@ -0,0 +1,42 @@ +{% 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="#!" class="breadcrumb hide-on-med-and-down">Crea 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 'create'%}" method="post" class="col s12"> + {% csrf_token %} + <div class="row"> + <div class="input-field col s12"> + <select name="doctype"> + <option value="" disabled selected>Scegli</option> + {% for doctype in docs%} + <option value="{{doctype.id}}">{{doctype.name}}</option> + {% endfor %} + </select> + <label>Documento</label> + </div> + </div> + <button class="btn waves-effect waves-light" type="submit" name="action">Invia + <i class="material-icons right">send</i> + </button> + </form> + </div> + </div> + </div> +</div> +{% endblock %} + +{% block script %} +$(document).ready(function(){ + $('select').formSelect(); + }); +{% endblock %}
\ No newline at end of file diff --git a/client/templates/client/index.html b/client/templates/client/index.html index 64b4d42..2b19f30 100644 --- a/client/templates/client/index.html +++ b/client/templates/client/index.html @@ -7,8 +7,45 @@ {% endblock%} {% block content %} +<div class="tap-target" data-target="add"> + <div class="tap-target-content"> + <h5>Aggiungi un documento</h5> + <p>Usa questo bottone per creare un nuovo documento</p> + </div> +</div> {% if user.is_authenticated %} {% if user.is_staff or perms.client.approved %} + <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 id="add" class="btn-floating btn-large red lightend-1" href="{% url 'create'%}"> + <i class="large material-icons">add</i> + </a> + </div> {% else %} <div class="row"> <div class="col l4 offset-l4 m8 offset-m2 s12"> @@ -34,4 +71,18 @@ </div> </div> {% endif %} +{% endblock %} + +{% block script %} +$(document).ready(function(){ + $('.tap-target').tapTarget(); + {% if empty %} + $('.tap-target').tapTarget('open'); + {% endif %} +}); +$('*').click(function(event) { + if (this === event.target) { + $('.tap-target').tapTarget('close'); + } +}); {% endblock %}
\ No newline at end of file |