aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-08-31 13:46:00 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-08-31 13:46:00 +0200
commitc46671ed9306eebb66322487ab600e070b2a81c6 (patch)
tree9fb917db87c003642f94c459a172fe36b19fea82
parentdynamicaly check for commit id (diff)
downloadscout-subs-c46671ed9306eebb66322487ab600e070b2a81c6.tar.gz
scout-subs-c46671ed9306eebb66322487ab600e070b2a81c6.zip
graghics improvement for mobile, and more modular
-rw-r--r--accounts/templates/accounts/index.html39
-rw-r--r--accounts/templates/accounts/terms.html10
-rw-r--r--client/templates/client/about.html8
-rw-r--r--client/templates/client/approve.html11
-rw-r--r--client/templates/client/doc_create.html3
-rw-r--r--client/templates/client/doc_edit.html3
-rw-r--r--client/templates/client/index.html5
-rw-r--r--server/templates/server/approve_doc.html7
-rw-r--r--server/templates/server/approve_user.html7
-rw-r--r--server/templates/server/data_request.html7
-rw-r--r--server/templates/server/doc_create.html7
-rw-r--r--server/templates/server/doc_list.html93
-rw-r--r--server/templates/server/doc_type.html86
-rw-r--r--server/templates/server/index.html5
-rw-r--r--server/templates/server/upload_doc.html7
-rw-r--r--server/templates/server/user_list.html47
-rw-r--r--templates/registration/base.html45
-rw-r--r--templates/registration/base_admin.html57
-rw-r--r--templates/registration/base_client.html40
-rw-r--r--templates/registration/base_custom.html25
20 files changed, 212 insertions, 300 deletions
diff --git a/accounts/templates/accounts/index.html b/accounts/templates/accounts/index.html
index 2c06113..9a1f873 100644
--- a/accounts/templates/accounts/index.html
+++ b/accounts/templates/accounts/index.html
@@ -1,28 +1,17 @@
-{% extends 'registration/base_custom.html' %}
-
-{% block title %}Home{% endblock %}
-
-{%block nav%}
- <nav class="nav-extended">
- <div class="nav-wrapper teal">
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
- <a href="#!" class="breadcrumb hide-on-med-and-down">Account</a>
- <ul class="right">
- {% if user.is_staff or perms.client.staff %}
- <li><a href="{% url 'server' %}">Pannello Admin</a></li>
- {% endif %}
- <li><a href="{% url 'personal' %}">{{ user.username }}</a></li>
- <li><a class="tooltipped" data-position="bottom" data-tooltip="Informazioni" href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
- <li><a href="{% url 'logout' %}"><i class="material-icons">exit_to_app</i></a></li>
- </ul>
- </div>
- <div class="nav-content teal">
- <ul class="tabs tabs-transparent">
- <li class="tab"><a class="active" href="#personal">Info Personali</a></li>
- <li class="tab"><a href="#medic">Info Mediche</a></li>
- </ul>
- </div>
- </nav>
+{% extends 'registration/base_client.html' %}
+
+{% block title %}Profilo{% endblock %}
+
+{% block breadcrumb %}
+ <a class="breadcrumb hide-on-med-and-down">Account</a>
+{% endblock %}
+{% block toolbar %}
+ <div class="nav-content teal">
+ <ul class="tabs tabs-transparent">
+ <li class="tab"><a class="active" href="#personal">Info Personali</a></li>
+ <li class="tab"><a href="#medic">Info Mediche</a></li>
+ </ul>
+ </div>
{% endblock%}
{% block content %}
diff --git a/accounts/templates/accounts/terms.html b/accounts/templates/accounts/terms.html
index 7a7b461..8b4443b 100644
--- a/accounts/templates/accounts/terms.html
+++ b/accounts/templates/accounts/terms.html
@@ -1,10 +1,9 @@
{% extends 'registration/base_client.html' %}
-{% block title %}About{% endblock %}
+{% block title %}Termini e condizioni{% endblock %}
-{%block nav%}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
- <a href="!#" class="breadcrumb hide-on-med-and-down">Termini e condizioni</a>
+{%block breadcrumb %}
+ <a class="breadcrumb hide-on-med-and-down">Termini e condizioni</a>
{% endblock%}
{% block content %}
@@ -21,7 +20,4 @@
</div>
</div>
</div>
-{% endblock %}
-
-{% block script %}
{% endblock %} \ No newline at end of file
diff --git a/client/templates/client/about.html b/client/templates/client/about.html
index 8de95a9..3d87d8d 100644
--- a/client/templates/client/about.html
+++ b/client/templates/client/about.html
@@ -2,9 +2,8 @@
{% block title %}About{% endblock %}
-{%block nav%}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
- <a href="!#" class="breadcrumb hide-on-med-and-down">Informazioni</a>
+{%block breadcrumb%}
+ <a class="breadcrumb hide-on-med-and-down">Informazioni</a>
{% endblock%}
{% block content %}
@@ -90,7 +89,4 @@
</div>
</div>
</div>
-{% endblock %}
-
-{% block script %}
{% endblock %} \ No newline at end of file
diff --git a/client/templates/client/approve.html b/client/templates/client/approve.html
index 3da2677..785e719 100644
--- a/client/templates/client/approve.html
+++ b/client/templates/client/approve.html
@@ -2,9 +2,8 @@
{% block title %}Approva{% endblock %}
-{% block nav %}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
- <a href="{% url 'approve' %}" class="breadcrumb hide-on-med-and-down">Approva</a>
+{% block breadcrumb %}
+ <a class="breadcrumb hide-on-med-and-down">Approva</a>
{% endblock %}
{% block content %}
@@ -30,10 +29,4 @@
</div>
</div>
{% endif %}
-{% endblock %}
-
-{% block script %}
-$(document).ready(function(){
- $('.tooltipped').tooltip();
-});
{% endblock %} \ No newline at end of file
diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html
index 82d23ff..33aeb96 100644
--- a/client/templates/client/doc_create.html
+++ b/client/templates/client/doc_create.html
@@ -2,8 +2,7 @@
{% block title %}Crea Documento{% endblock %}
-{% block nav %}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+{% block breadcrumb %}
<a href="#!" class="breadcrumb hide-on-med-and-down">Crea Documento</a>
{% endblock %}
diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html
index 3c97eee..e969013 100644
--- a/client/templates/client/doc_edit.html
+++ b/client/templates/client/doc_edit.html
@@ -2,8 +2,7 @@
{% block title %}Modifica documento{% endblock %}
-{% block nav %}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+{% block breadcrumb %}
<a href="#!" class="breadcrumb hide-on-med-and-down">Modifica Documento</a>
{% endblock %}
diff --git a/client/templates/client/index.html b/client/templates/client/index.html
index 20ce2d3..33cf493 100644
--- a/client/templates/client/index.html
+++ b/client/templates/client/index.html
@@ -2,10 +2,6 @@
{% block title %}Home{% endblock %}
-{%block nav%}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
-{% endblock%}
-
{% block content %}
<div class="tap-target teal" data-target="add">
<div class="tap-target-content">
@@ -378,7 +374,6 @@
{% block script %}
$(document).ready(function(){
- $('.tooltipped').tooltip();
{% if user.is_authenticated %}
{% if user.is_staff or perms.client.approved %}
$('.collapsible').collapsible();
diff --git a/server/templates/server/approve_doc.html b/server/templates/server/approve_doc.html
index c4bdca4..42f4436 100644
--- a/server/templates/server/approve_doc.html
+++ b/server/templates/server/approve_doc.html
@@ -1,11 +1,10 @@
-{% extends 'registration/base.html' %}
+{% extends 'registration/base_admin.html' %}
{% block title %}Admin - Approva Documento{% endblock %}
-{% block nav %}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+{% block breadcrumb %}
<a href="{% url 'server'%}" class="breadcrumb hide-on-med-and-down">Admin</a>
- <a href="{% url 'docapprove'%}" class="breadcrumb hide-on-med-and-down">Approva Documento</a>
+ <a class="breadcrumb hide-on-med-and-down">Approva Documento</a>
{% endblock %}
{% block content %}
diff --git a/server/templates/server/approve_user.html b/server/templates/server/approve_user.html
index 09afee9..288b4f9 100644
--- a/server/templates/server/approve_user.html
+++ b/server/templates/server/approve_user.html
@@ -1,11 +1,10 @@
-{% extends 'registration/base.html' %}
+{% extends 'registration/base_admin.html' %}
{% block title %}Admin - Approva Utente{% endblock %}
-{% block nav %}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+{% block breadcrumb %}
<a href="{% url 'server'%}" class="breadcrumb hide-on-med-and-down">Admin</a>
- <a href="{% url 'uapprove'%}" class="breadcrumb hide-on-med-and-down">Approva Utente</a>
+ <a class="breadcrumb hide-on-med-and-down">Approva Utente</a>
{% endblock %}
{% block content %}
diff --git a/server/templates/server/data_request.html b/server/templates/server/data_request.html
index 8b0ed7c..1f65ff1 100644
--- a/server/templates/server/data_request.html
+++ b/server/templates/server/data_request.html
@@ -1,11 +1,10 @@
-{% extends 'registration/base.html' %}
+{% extends 'registration/base_admin.html' %}
{% block title %}Admin - Richiesta dati{% endblock %}
-{% block nav %}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+{% block breadcrumb %}
<a href="{% url 'server'%}" class="breadcrumb hide-on-med-and-down">Admin</a>
- <a href="{% url 'request'%}" class="breadcrumb hide-on-med-and-down">Richiesta dati</a>
+ <a class="breadcrumb hide-on-med-and-down">Richiesta dati</a>
{% endblock %}
{% block content %}
diff --git a/server/templates/server/doc_create.html b/server/templates/server/doc_create.html
index b078bc5..a9877a3 100644
--- a/server/templates/server/doc_create.html
+++ b/server/templates/server/doc_create.html
@@ -1,12 +1,11 @@
-{% extends 'registration/base.html' %}
+{% extends 'registration/base_admin.html' %}
{% block title %}Admin - Crea Tipo{% endblock %}
-{% block nav %}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+{% block breadcrumb %}
<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">Crea Tipo</a>
+ <a class="breadcrumb hide-on-med-and-down">Crea Tipo</a>
{% endblock %}
{% block content %}
diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html
index 2bdc6c5..b9f1b1b 100644
--- a/server/templates/server/doc_list.html
+++ b/server/templates/server/doc_list.html
@@ -1,53 +1,34 @@
-{% extends 'registration/base_custom.html' %}
+{% extends 'registration/base_admin.html' %}
{% block title %}Admin - Documenti{% endblock %}
-{% block nav %}
- <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="{% url 'doclist' %}" class="breadcrumb hide-on-med-and-down">Documenti</a>
- <ul class="right">
- {% if user.is_staff or perms.client.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">
- <ul>
- <li>
- <input id="select-all" type="checkbox" class="filled-in"/>
- <label for="select-all">
- <a class="tooltipped" data-position="top" data-tooltip="(De)Seleziona tutti" onclick=""><i class="material-icons">select_all</i>
- </label>
- </a>
- </li>
- <li><a class="tooltipped modal-trigger" href="#modal2" data-position="top" data-tooltip="Archivia selezionati"><i class="material-icons">archive</i></a></li>
- <li><a class="tooltipped" data-position="top" data-tooltip="Dearchivia selezionati" Onclick="send('unarchive')"><i class="material-icons">unarchive</i></a></li>
- <li><a class="tooltipped modal-trigger" href="#modal3" data-position="top" data-tooltip="Scarica selezionati" Onclick="send('download')"><i class="material-icons">file_download</i></a></li>
- {% if settings.DEBUG %}
- <li><a class="tooltipped" data-position="top" data-tooltip="Approva selezionati" Onclick="send('approve')"><i class="material-icons left">check</i>DEBUG</a></li>
- <li><a class="tooltipped" data-position="top" data-tooltip="Elimina selezionati" Onclick="send('delete')"><i class="material-icons left">delete</i>DEBUG</a></li>
- {% endif %}
- </ul>
- <ul class="right">
- <li><a class="tooltipped" data-position="top" data-tooltip="Pulisci filtri" Onclick="send('clear')"><i class="material-icons">clear</i></a></li>
- <li><a href="#modal1" data-target="modal1" class="modal-trigger tooltipped" data-position="top" data-tooltip="Filtri"><i class="material-icons">filter_list</i></a></li>
- </ul>
- </div>
- </nav>
+{% block breadcrumb %}
+ <a href="{% url 'server'%}" class="breadcrumb hide-on-med-and-down">Admin</a>
+ <a class="breadcrumb hide-on-med-and-down">Documenti</a>
+{% endblock %}
+{% block toolbar %}
+ <div class="nav-wrapper red lighten-1">
+ <ul>
+ <li>
+ <input id="select-all" type="checkbox" class="filled-in"/>
+ <label for="select-all">
+ <a class="tooltipped" data-position="top" data-tooltip="(De)Seleziona tutti" onclick=""><i class="material-icons">select_all</i>
+ </label>
+ </a>
+ </li>
+ <li><a class="tooltipped modal-trigger" href="#modal2" data-position="top" data-tooltip="Archivia selezionati"><i class="material-icons">archive</i></a></li>
+ <li><a class="tooltipped" data-position="top" data-tooltip="Dearchivia selezionati" Onclick="send('unarchive')"><i class="material-icons">unarchive</i></a></li>
+ <li><a class="tooltipped modal-trigger" href="#modal3" data-position="top" data-tooltip="Scarica selezionati" Onclick="send('download')"><i class="material-icons">file_download</i></a></li>
+ {% if settings.DEBUG %}
+ <li><a class="tooltipped" data-position="top" data-tooltip="Approva selezionati" Onclick="send('approve')"><i class="material-icons left">check</i>DEBUG</a></li>
+ <li><a class="tooltipped" data-position="top" data-tooltip="Elimina selezionati" Onclick="send('delete')"><i class="material-icons left">delete</i>DEBUG</a></li>
+ {% endif %}
+ </ul>
+ <ul class="right">
+ <li><a class="tooltipped" data-position="top" data-tooltip="Pulisci filtri" Onclick="send('clear')"><i class="material-icons">clear</i></a></li>
+ <li><a href="#modal1" data-target="modal1" class="modal-trigger tooltipped" data-position="top" data-tooltip="Filtri"><i class="material-icons">filter_list</i></a></li>
+ </ul>
+ </div>
{% endblock %}
{% block content %}
@@ -73,6 +54,9 @@
<div class="determinate" style="width: 0%"></div>
</div>
<p id="progress_text"></p>
+ <div id="modal_close_button" class="modal-footer" hidden>
+ <a onclick="resetModal()" class="modal-close waves-effect waves-green btn-flat">Chiudi</a>
+ </div>
</div>
</div>
@@ -469,8 +453,9 @@
{%block script%}
$(document).ready(function(){
$('.collapsible').collapsible();
- $('.tooltipped').tooltip();
- $('.modal').modal();
+ $('#modal1').modal();
+ $('#modal2').modal();
+ $('#modal3').modal({"dismissible": false});
$('.datepicker').datepicker(options);
{% if error %}
M.toast({html: '{{ error_text}}', classes: 'orange'})
@@ -482,6 +467,13 @@ $(document).ready(function(){
{% endif %}
});
+function resetModal() {
+ $('#modal3').modal('close');
+ document.getElementById('progress_bar').className = "indeterminate";
+ document.getElementById("modal_close_button").hidden = true;
+ document.getElementById('progress_text').innerHTML = "";
+}
+
$('.chips').chips();
$('#chips_type').chips({
placeholder: 'Tipo',
@@ -552,7 +544,8 @@ function update() {
if (data[2]) {
bar.className = "indeterminate";
url = '{% url "progress" %}' + '?job=' + '{{task_id}}' + '&download=true';
- box.innerHTML = "Il download dovrebbe partire automaticamente. Nel caso non succedesse cliccare il seguente <a id='downloadLink' href=" + url + ">link</a><br>Clicca lo sfondo per chiudere la finestra";
+ box.innerHTML = "Il download dovrebbe partire automaticamente. Nel caso non succedesse cliccare il seguente <a id='downloadLink' href=" + url + ">link</a>";
+ document.getElementById("modal_close_button").hidden = false;
document.getElementById('downloadLink').click();
} else {
bar.style.width = "100%";
diff --git a/server/templates/server/doc_type.html b/server/templates/server/doc_type.html
index 01db1be..f621e07 100644
--- a/server/templates/server/doc_type.html
+++ b/server/templates/server/doc_type.html
@@ -1,58 +1,39 @@
-{% extends 'registration/base_custom.html' %}
+{% extends 'registration/base_admin.html' %}
{% block title %}Admin - Tipo Documenti{% endblock %}
-{% block nav %}
- <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 ref="{% url 'doctype' %}" class="breadcrumb hide-on-med-and-down">Tipo Doc</a>
- <ul class="right">
- {% if user.is_staff or perms.client.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">
- <ul>
- <li>
- <input id="select-all" type="checkbox" class="filled-in"/>
- <label for="select-all">
- <a class="tooltipped" data-position="top" data-tooltip="(De)Seleziona tutti" onclick=""><i class="material-icons">select_all</i>
- </label>
- </a>
- </li>
- <li><a class="tooltipped" data-position="top" data-tooltip="Mostra selezionati" onclick="send('show')"><i class="material-icons">visibility</i></a></li>
- <li><a class="tooltipped" data-position="top" data-tooltip="Nascondi selezionati" Onclick="send('hide')"><i class="material-icons">visibility_off</i></a></li>
- <li><a class="tooltipped" data-position="top" data-tooltip="Elimina selezionati" Onclick="send('delete')"><i class="material-icons">delete</i></a></li>
- </ul>
- <ul class="right">
- <li class="hide-on-med-and-down">
- <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>
- </div>
- </form>
- </li>
- <li class="hide-on-med-and-down"><a class="tooltipped" data-position="top" data-tooltip="Pulisci filtri" Onclick="send('clear')"><i class="material-icons">clear</i></a></li>
- <li class="hide-on-med-and-down"><a href="#modal1" data-target="modal1" class="modal-trigger tooltipped" data-position="top" data-tooltip="Filtri"><i class="material-icons">filter_list</i></a></li>
- <li class="hide-on-large-only"><a class='dropdown-trigger' href='#' data-target='dropdown1'><i class="material-icons">filter_list</i></a></li>
- </ul>
- </div>
- </nav>
+{% block breadcrumb %}
+ <a href="{% url 'server'%}" class="breadcrumb hide-on-med-and-down">Admin</a>
+ <a class="breadcrumb hide-on-med-and-down">Tipo Doc</a>
+{% endblock %}
+{% block toolbar %}
+ <div class="nav-wrapper red lighten-1">
+ <ul>
+ <li>
+ <input id="select-all" type="checkbox" class="filled-in"/>
+ <label for="select-all">
+ <a class="tooltipped" data-position="top" data-tooltip="(De)Seleziona tutti" onclick=""><i class="material-icons">select_all</i>
+ </label>
+ </a>
+ </li>
+ <li><a class="tooltipped" data-position="top" data-tooltip="Mostra selezionati" onclick="send('show')"><i class="material-icons">visibility</i></a></li>
+ <li><a class="tooltipped" data-position="top" data-tooltip="Nascondi selezionati" Onclick="send('hide')"><i class="material-icons">visibility_off</i></a></li>
+ <li><a class="tooltipped" data-position="top" data-tooltip="Elimina selezionati" Onclick="send('delete')"><i class="material-icons">delete</i></a></li>
+ </ul>
+ <ul class="right">
+ <li class="hide-on-med-and-down">
+ <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>
+ </div>
+ </form>
+ </li>
+ <li class="hide-on-med-and-down"><a class="tooltipped" data-position="top" data-tooltip="Pulisci filtri" Onclick="send('clear')"><i class="material-icons">clear</i></a></li>
+ <li class="hide-on-med-and-down"><a href="#modal1" data-target="modal1" class="modal-trigger tooltipped" data-position="top" data-tooltip="Filtri"><i class="material-icons">filter_list</i></a></li>
+ <li class="hide-on-large-only"><a class='dropdown-trigger' href='#' data-target='dropdown1'><i class="material-icons">filter_list</i></a></li>
+ </ul>
+ </div>
<ul id='dropdown1' class='dropdown-content'>
<li><a Onclick="send('clear')"><i class="material-icons">clear</i>Pulisci</a></li>
<li><a href="#modal1" data-target="modal1" class="modal-trigger"><i class="material-icons">filter_list</i>Filtri</a></li>
@@ -224,7 +205,6 @@
{%block script%}
$(document).ready(function(){
$('.collapsible').collapsible();
- $('.tooltipped').tooltip();
$('.modal').modal();
$('.dropdown-trigger').dropdown({constantWidth: false});
{% if error %}
diff --git a/server/templates/server/index.html b/server/templates/server/index.html
index 83be995..f2a2242 100644
--- a/server/templates/server/index.html
+++ b/server/templates/server/index.html
@@ -1,9 +1,8 @@
-{% extends 'registration/base.html' %}
+{% extends 'registration/base_admin.html' %}
{% block title %}Admin{% endblock %}
-{% block nav %}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+{% block breadcrumb %}
<a href="#!" class="breadcrumb hide-on-med-and-down">Admin</a>
{% endblock %}
diff --git a/server/templates/server/upload_doc.html b/server/templates/server/upload_doc.html
index 3650cd8..b29e2ae 100644
--- a/server/templates/server/upload_doc.html
+++ b/server/templates/server/upload_doc.html
@@ -1,11 +1,10 @@
-{% extends 'registration/base.html' %}
+{% extends 'registration/base_admin.html' %}
{% block title %}Admin - Carica documento{% endblock %}
-{% block nav %}
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+{% block breadcrumb %}
<a href="{% url 'server'%}" class="breadcrumb hide-on-med-and-down">Admin</a>
- <a href="{% url 'docupload'%}" class="breadcrumb hide-on-med-and-down">Carica Documento</a>
+ <a class="breadcrumb hide-on-med-and-down">Carica Documento</a>
{% endblock %}
{% block content %}
diff --git a/server/templates/server/user_list.html b/server/templates/server/user_list.html
index 54b7b77..0537ab0 100644
--- a/server/templates/server/user_list.html
+++ b/server/templates/server/user_list.html
@@ -1,39 +1,20 @@
-{% extends 'registration/base_custom.html' %}
+{% extends 'registration/base_admin.html' %}
{% block title %}Admin - Lista Utenti{% endblock %}
-{% block nav %}
- <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 or perms.client.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>
- </div>
- </form>
- </div>
- </nav>
+{% block breadcrumb %}
+ <a href="{% url 'server'%}" class="breadcrumb hide-on-med-and-down">Admin</a>
+ <a class="breadcrumb hide-on-med-and-down">Lista Utenti</a>
+{% endblock %}
+{% block toolbar %}
+ <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>
+ </div>
+ </form>
+ </div>
{% endblock %}
{% block content %}
diff --git a/templates/registration/base.html b/templates/registration/base.html
deleted file mode 100644
index e2885cd..0000000
--- a/templates/registration/base.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- {% load static %}
- <link rel="stylesheet" type="text/css" href="{% static 'material_icons.css' %}">
- <link rel="stylesheet" type="text/css" href="{% static 'materialize.min.css' %}">
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
- <meta charset="utf-8">
- <title>{% block title %}Scout Brega{% endblock %}</title>
-</head>
-<body>
- <nav>
- <div class="nav-wrapper red lighten-1">
- {% block nav %}
- {% endblock %}
- <ul class="right">
- {% if user.is_staff or perms.client.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>
- </nav>
- <main style="margin-left: 10px;margin-right: 10px;margin-top: 10px;">
- {% block content %}
- {% endblock %}
- </main>
- <script type="text/javascript" src="{% static 'jquery-3.5.1.min.js' %}"></script>
- <script type="text/javascript" src="{% static 'materialize.min.js' %}"></script>
- <script>
- {% block script %}
- {% endblock%}
- </script>
-</body>
-</html> \ No newline at end of file
diff --git a/templates/registration/base_admin.html b/templates/registration/base_admin.html
new file mode 100644
index 0000000..a06c54d
--- /dev/null
+++ b/templates/registration/base_admin.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+ {% load static %}
+ <link rel="stylesheet" type="text/css" href="{% static 'material_icons.css' %}">
+ <link rel="stylesheet" type="text/css" href="{% static 'materialize.min.css' %}">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ <meta charset="utf-8">
+ <title>{% block title %}Scout Brega{% endblock %}</title>
+</head>
+<body>
+ <nav class="nav-extended">
+ <div class="nav-wrapper red lighten-1">
+ <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb hide-on-small-only">Home</a>
+ <ul class="left hide-on-med-and-up">
+ <li><a href="{% url 'index' %}"><i class="material-icons">home</i></a></li>
+ </ul>
+ {% block breadcrumb %}
+ {% endblock %}
+ <ul class="right">
+ {% if user.is_authenticated %}
+ {% if user.is_staff or perms.client.staff %}
+ <li class="hide-on-small-only"><a href="{% url 'server' %}">Pannello Admin</a></li>
+ {% endif %}
+ <li class="hide-on-small-only tooltipped" data-position="bottom" data-tooltip="Dati personali"><a href="{% url 'personal' %}">{{ user.username }}</a></li>
+ <li class="hide-on-med-and-up tooltipped" data-position="bottom" data-tooltip="Dati personali"><a href="{% url 'personal' %}"><i class="material-icons">person</i></a></li>
+ {% if user.is_staff or perms.client.staff %}
+ <li class="tooltipped hide-on-med-and-up" data-position="bottom" data-tooltip="Pannello Admin" class="hide-on-med-and-up"><a href="{% url 'server' %}"><i class="material-icons">build</i></a></li>
+ {% endif %}
+ <li class="tooltipped" data-position="bottom" data-tooltip="Informazioni"><a href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
+ <li class="tooltipped" data-position="bottom" data-tooltip="Logout"><a href="{% url 'logout' %}"><i class="material-icons">exit_to_app</i></a></li>
+ {% else %}
+ <li><a href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
+ <li><a href="{% url 'signup' %}">Registrazione</a></li>
+ <li><a href="{% url 'login' %}">Login</a></li>
+ {% endif %}
+ </ul>
+ </div>
+ {% block toolbar %}
+ {% endblock %}
+ </nav>
+
+ <main style="margin-left: 10px;margin-right: 10px;margin-top: 10px;">
+ {% block content %}
+ {% endblock %}
+ </main>
+ <script type="text/javascript" src="{% static 'jquery-3.5.1.min.js' %}"></script>
+ <script type="text/javascript" src="{% static 'materialize.min.js' %}"></script>
+ <script>
+ $(document).ready(function(){
+ $('.tooltipped').tooltip();
+ });
+ {% block script %}
+ {% endblock%}
+ </script>
+</body>
+</html> \ No newline at end of file
diff --git a/templates/registration/base_client.html b/templates/registration/base_client.html
index b526c84..241f7ce 100644
--- a/templates/registration/base_client.html
+++ b/templates/registration/base_client.html
@@ -9,30 +9,37 @@
<title>{% block title %}Scout Brega{% endblock %}</title>
</head>
<body>
- <nav>
+ <nav class="nav-extended">
<div class="nav-wrapper teal">
- {% block nav %}
+ <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb hide-on-small-only">Home</a>
+ <ul class="left hide-on-med-and-up">
+ <li><a href="{% url 'index' %}"><i class="material-icons">home</i></a></li>
+ </ul>
+ {% block breadcrumb %}
{% endblock %}
<ul class="right">
+ {% if user.is_authenticated %}
{% if user.is_staff or perms.client.staff %}
- <li><a href="{% url 'server' %}">Pannello Admin</a></li>
- {% endif %}
- {% if user.is_authenticated %}
- <li><a class="tooltipped" data-position="bottom" data-tooltip="Preferenze" href="{% url 'personal' %}">{{ user.username }}</a></li>
+ <li class="hide-on-small-only"><a href="{% url 'server' %}">Pannello Admin</a></li>
{% endif %}
- {% if user.username != "" %}
- <li><a class="tooltipped" data-position="bottom" data-tooltip="Informazioni" href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
- <li>
- <a class="tooltipped" data-position="bottom" data-tooltip="Logout" href="{% url 'logout' %}"><i class="material-icons">exit_to_app</i></a>
- </li>
- {% else %}
- <li><a class="tooltipped" data-position="bottom" data-tooltip="Informazioni" href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
- <li><a href="{% url 'signup' %}">Registrazione</a></li>
- <li><a href="{% url 'login' %}">Login</a></li>
+ <li class="hide-on-small-only tooltipped" data-position="bottom" data-tooltip="Dati personali"><a href="{% url 'personal' %}">{{ user.username }}</a></li>
+ <li class="hide-on-med-and-up tooltipped" data-position="bottom" data-tooltip="Dati personali"><a href="{% url 'personal' %}"><i class="material-icons">person</i></a></li>
+ {% if user.is_staff or perms.client.staff %}
+ <li class="tooltipped hide-on-med-and-up" data-position="bottom" data-tooltip="Pannello Admin" class="hide-on-med-and-up"><a href="{% url 'server' %}"><i class="material-icons">build</i></a></li>
{% endif %}
+ <li class="tooltipped" data-position="bottom" data-tooltip="Informazioni"><a href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
+ <li class="tooltipped" data-position="bottom" data-tooltip="Logout"><a href="{% url 'logout' %}"><i class="material-icons">exit_to_app</i></a></li>
+ {% else %}
+ <li><a href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
+ <li><a href="{% url 'signup' %}">Registrazione</a></li>
+ <li><a href="{% url 'login' %}">Login</a></li>
+ {% endif %}
</ul>
</div>
+ {% block toolbar %}
+ {% endblock %}
</nav>
+
<main style="margin-left: 10px;margin-right: 10px;margin-top: 10px;">
{% block content %}
{% endblock %}
@@ -40,6 +47,9 @@
<script type="text/javascript" src="{% static 'jquery-3.5.1.min.js' %}"></script>
<script type="text/javascript" src="{% static 'materialize.min.js' %}"></script>
<script>
+ $(document).ready(function(){
+ $('.tooltipped').tooltip();
+ });
{% block script %}
{% endblock%}
</script>
diff --git a/templates/registration/base_custom.html b/templates/registration/base_custom.html
deleted file mode 100644
index 89c665a..0000000
--- a/templates/registration/base_custom.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- {% load static %}
- <link rel="stylesheet" type="text/css" href="{% static 'material_icons.css' %}">
- <link rel="stylesheet" type="text/css" href="{% static 'materialize.min.css' %}">
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
- <meta charset="utf-8">
- <title>{% block title %}Scout Brega{% endblock %}</title>
-</head>
-<body>
- {% block nav %}
- {% endblock %}
- <main id="main" style="margin-left: 10px;margin-right: 10px;margin-top: 10px;">
- {% block content %}
- {% endblock %}
- </main>
- <script type="text/javascript" src="{% static 'jquery-3.5.1.min.js' %}"></script>
- <script type="text/javascript" src="{% static 'materialize.min.js' %}"></script>
- <script type="text/javascript">
- {% block script %}
- {% endblock %}
- </script>
-</body>
-</html> \ No newline at end of file