aboutsummaryrefslogtreecommitdiffstats
path: root/server/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-08-30 22:38:42 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-08-30 22:38:42 +0200
commit0a19d5ff7a7b09dbc81f5e4c8ec4fee334505cda (patch)
tree4e099998348b73f634bbfe052b134f96c15d4c37 /server/templates
parentuse session varables to store progress bar data (diff)
downloadscout-subs-0a19d5ff7a7b09dbc81f5e4c8ec4fee334505cda.tar.gz
scout-subs-0a19d5ff7a7b09dbc81f5e4c8ec4fee334505cda.zip
custom query and group capi
Diffstat (limited to 'server/templates')
-rw-r--r--server/templates/server/data_request.html52
-rw-r--r--server/templates/server/index.html21
-rw-r--r--server/templates/server/user_list.html15
3 files changed, 82 insertions, 6 deletions
diff --git a/server/templates/server/data_request.html b/server/templates/server/data_request.html
new file mode 100644
index 0000000..8b0ed7c
--- /dev/null
+++ b/server/templates/server/data_request.html
@@ -0,0 +1,52 @@
+{% extends 'registration/base.html' %}
+
+{% block title %}Admin - Richiesta dati{% 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 'request'%}" class="breadcrumb hide-on-med-and-down">Richiesta dati</a>
+{% endblock %}
+
+{% block content %}
+
+<div class="row">
+ <div class="col l4 offset-l4 m8 offset-m2 s12">
+ <div class="card">
+ <form id="form" action="{% url 'request'%}" method="post">
+ {% csrf_token %}
+ <div class="card-content">
+ <div class="input-field col s12">
+ <select name="request">
+ <option value="" disabled selected>Scegli</option>
+ <option value="email_all">Email (tutti gli utenti)</option>
+ <option value="email_non_staff">Email (solo non capi)</option>
+ </select>
+ <label>Richiesta dati</label>
+ </div>
+ <textarea id="data" class="materialize-textarea">{{data}}</textarea>
+ </div>
+ <div class="card-action">
+ <a class="waves-effect waves-light btn red lighten-1" href="#" onclick="document.getElementById('form').submit()">Invia</a>
+ <a class="waves-effect waves-light btn red lighten-1" onclick="copy()">Copia risultato</a>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+{% endblock %}
+
+{% block script %}
+document.addEventListener('DOMContentLoaded', function() {
+ var elems = document.querySelectorAll('select');
+ var options = {};
+ var instances = M.FormSelect.init(elems, options);
+});
+
+function copy() {
+ var copyText = document.getElementById("data");
+ copyText.select();
+ copyText.setSelectionRange(0, 99999); /*For mobile devices*/
+ document.execCommand("copy");
+}
+{% endblock%} \ No newline at end of file
diff --git a/server/templates/server/index.html b/server/templates/server/index.html
index 2e299d1..83be995 100644
--- a/server/templates/server/index.html
+++ b/server/templates/server/index.html
@@ -10,7 +10,7 @@
{% block content %}
<div class="row">
{% if user.is_staff %}
- <div class="col l4 s12">
+ <div class="col l5 s12">
<div class="card large">
<div class="card-content">
<p>
@@ -31,14 +31,27 @@
</p>
</div>
<div class="card-action">
+ <div class="hide-on-med-and-down">
<a class="waves-effect waves-light btn red lighten-1" href="{% url 'ulist' %}">Lista utenti</a>
<a class="waves-effect waves-light btn red lighten-1" href="{% url 'uapprove' %}">Approva utente</a>
+ <a class="waves-effect waves-light btn red lighten-1" href="{% url 'request' %}">Richiedi dati</a>
+ </div>
+
+ <div class="hide-on-large-only">
+ <a class="col s12 waves-effect waves-light btn red lighten-1" href="{% url 'ulist' %}">Lista utenti</a>
+ <br>
+ <br>
+ <a class="col s12 waves-effect waves-light btn red lighten-1" href="{% url 'uapprove' %}">Approva utente</a>
+ <br>
+ <br>
+ <a class="col s12 waves-effect waves-light btn red lighten-1" href="{% url 'request' %}">Richiedi dati</a>
+ </div>
</div>
</div>
</div>
{% endif %}
{% if user.is_staff %}
- <div class="col l8 s12">
+ <div class="col l7 s12">
{% else %}
<div class="col s12">
{% endif %}
@@ -62,14 +75,14 @@
</ul>
</div>
<div class="card-action">
- <div class="hide-on-small-only">
+ <div class="hide-on-med-and-down">
<a class="waves-effect waves-light btn red lighten-1" href="{% url 'doctype' %}">Lista tipo doc</a>
<a class="waves-effect waves-light btn red lighten-1" href="{% url 'doclist' %}">Lista documenti</a>
<a class="waves-effect waves-light btn red lighten-1" href="{% url 'docapprove' %}">Approva documento</a>
<a class="waves-effect waves-light btn red lighten-1" href="{% url 'docupload' %}">Carica firma</a>
</div>
- <div class="hide-on-med-and-up">
+ <div class="hide-on-large-only">
<a class="col s12 waves-effect waves-light btn red lighten-1" href="{% url 'doctype' %}">Lista tipo doc</a>
<br>
<br>
diff --git a/server/templates/server/user_list.html b/server/templates/server/user_list.html
index 721f284..54b7b77 100644
--- a/server/templates/server/user_list.html
+++ b/server/templates/server/user_list.html
@@ -45,7 +45,9 @@
<li>
<div class="collapsible-header list">
{% if user.0.is_staff %}
- <i class="material-icons">grade</i>
+ <i class="material-icons">star</i>
+ {% elif user.6 %}
+ <i class="material-icons">star_border</i>
{% endif %}
{{user.0.first_name}} {{user.0.last_name}}
</div>
@@ -64,7 +66,16 @@
<a onclick="send('d{{user.0.id}}')" class="modal-close waves-effect waves-green btn-flat">Deapprova</a>
</div>
</div>
- <a class="waves-effect waves-light btn red lighten-1 modal-trigger" href="#modal{{user.0.id}}"><i class="material-icons left">remove_circle_outline</i>Deapprova utente</a>
+ <div class="hide-on-med-and-down">
+ <a class="waves-effect waves-light btn red lighten-1 modal-trigger" href="#modal{{user.0.id}}"><i class="material-icons left">remove_circle_outline</i>Deapprova utente</a>
+ <a class="waves-effect waves-light btn red lighten-1" onclick="send('c{{user.0.id}}')"><i class="material-icons left">star_border</i>Capo/non</a>
+ </div>
+ <div style="margin-bottom: 0px;" class="hide-on-large-only row">
+ <a class="col s12 waves-effect waves-light btn red lighten-1 modal-trigger" href="#modal{{user.0.id}}"><i class="material-icons left">remove_circle_outline</i>Deapprova utente</a>
+ <br>
+ <br>
+ <a class="col s12 waves-effect waves-light btn red lighten-1" onclick="send('c{{user.0.id}}')"><i class="material-icons left">star_border</i>Capo/non</a>
+ </div>
<br><br>
{% endif %}
<ul class="collection">