diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-06-20 00:28:16 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-06-20 00:28:16 +0200 |
commit | ffb9b4111a891fda9e9e1ddf19de936bdbd664f8 (patch) | |
tree | cbd563acbfb97d2cad4f7da425de412aad00e5dd /client/templates/client/index.html | |
parent | More data for users (diff) | |
download | scout-subs-ffb9b4111a891fda9e9e1ddf19de936bdbd664f8.tar.gz scout-subs-ffb9b4111a891fda9e9e1ddf19de936bdbd664f8.zip |
Document support
Diffstat (limited to '')
-rw-r--r-- | client/templates/client/index.html | 51 |
1 files changed, 51 insertions, 0 deletions
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 |