aboutsummaryrefslogtreecommitdiffstats
path: root/server/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-07-20 23:53:03 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-07-20 23:53:03 +0200
commit3a175662da52cc770d52e46a9abe2cd782aa2142 (patch)
treeb65ec8d8e717b1928e47482cb54bd0787f7a0f05 /server/templates
parentreset password and decorators for login check (diff)
downloadscout-subs-3a175662da52cc770d52e46a9abe2cd782aa2142.tar.gz
scout-subs-3a175662da52cc770d52e46a9abe2cd782aa2142.zip
search users, show attachments, fancy pass reset
Diffstat (limited to '')
-rw-r--r--server/templates/server/doc_list.html27
-rw-r--r--server/templates/server/download_doc.html27
-rw-r--r--server/templates/server/user_list.html81
3 files changed, 130 insertions, 5 deletions
diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html
index 5206d2f..51cd5e4 100644
--- a/server/templates/server/doc_list.html
+++ b/server/templates/server/doc_list.html
@@ -380,6 +380,33 @@
</span></div>
</li>
{% endif %}
+ {% if doc.0.document_type.medical_data %}
+ <li>
+ <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">
+ <img src="data:;base64,{{ doc.5 }}">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ <img src="data:;base64,{{ doc.6 }}">
+ </div>
+ </div>
+ </div>
+ </div>
+ </span></div>
+ </li>
+ {% endif %}
</ul>
</span></div>
</li>
diff --git a/server/templates/server/download_doc.html b/server/templates/server/download_doc.html
index 15ec72a..b55b9a0 100644
--- a/server/templates/server/download_doc.html
+++ b/server/templates/server/download_doc.html
@@ -247,6 +247,33 @@
</span></div>
</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">
+ <img src="data:;base64,{{ vac }}">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ <img src="data:;base64,{{ health }}">
+ </div>
+ </div>
+ </div>
+ </div>
+ </span></div>
+ </li>
+ {% endif %}
</ul>
</span></div>
</li>
diff --git a/server/templates/server/user_list.html b/server/templates/server/user_list.html
index 8abf5e8..8ee2008 100644
--- a/server/templates/server/user_list.html
+++ b/server/templates/server/user_list.html
@@ -1,11 +1,40 @@
-{% extends 'registration/base.html' %}
+{% extends 'registration/base_custom.html' %}
{% block title %}Admin - Lista Utenti{% 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="#!" class="breadcrumb hide-on-med-and-down">Lista Utenti</a>
+ <nav class="nav-extended">
+ <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="#!" class="breadcrumb hide-on-med-and-down">Lista Utenti</a>
+ <ul class="right">
+ {% if user.is_staff %}
+ <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>
+ <div class="nav-wrapper red lighten-1">
+ <form>
+ <div class="input-field">
+ <input autocomplete="off" id="search" type="search" onkeyup="filterResults()" required>
+ <label class="label-icon" for="search"><i class="material-icons">search</i></label>
+ <i class="material-icons">close</i>
+ </div>
+ </form>
+ </div>
+ </nav>
{% endblock %}
{% block content %}
@@ -15,7 +44,7 @@
<ul class="collapsible">
{% for user in users %}
<li>
- <div class="collapsible-header">
+ <div class="collapsible-header list">
{% if user.0.is_staff %}
<i class="material-icons">grade</i>
{% endif %}
@@ -217,6 +246,31 @@
</li>
<li>
<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">
+ <img src="data:;base64,{{ user.4 }}">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ <img src="data:;base64,{{ user.5 }}">
+ </div>
+ </div>
+ </div>
+ </div>
+ </span></div>
+ </li>
+ <li>
+ <div class="collapsible-header">
<i class="material-icons">assignment</i>Documenti
</div>
<div class="collapsible-body"><span>
@@ -250,4 +304,21 @@ function send(id) {
action.setAttribute('value', id);
form.submit()
}
+
+function filterResults() {
+ var search = document.getElementById('search')
+ var filter = search.value.toUpperCase()
+ var items = document.getElementsByClassName('list')
+
+
+ for (i = 0; i < items.length; i++) {
+ var a = items[i];
+ var txtValue = a.innerText;
+ if (txtValue.toUpperCase().indexOf(filter) > -1) {
+ items[i].style.display = "";
+ } else {
+ items[i].style.display = "none";
+ }
+ }
+}
{% endblock %} \ No newline at end of file