aboutsummaryrefslogtreecommitdiffstats
path: root/server/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-06-21 15:38:44 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-06-21 15:38:44 +0200
commit0dfed66987e704d757725257d4b2a5e55b72ee5e (patch)
tree123320fe1f1c5809d34586754d162f57c02fb09c /server/templates
parentPdf download, filter on doc type (diff)
downloadscout-subs-0dfed66987e704d757725257d4b2a5e55b72ee5e.tar.gz
scout-subs-0dfed66987e704d757725257d4b2a5e55b72ee5e.zip
Filter improve, missing chips and date
Diffstat (limited to '')
-rw-r--r--server/templates/server/doc_list.html56
1 files changed, 42 insertions, 14 deletions
diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html
index 730837c..331a3d5 100644
--- a/server/templates/server/doc_list.html
+++ b/server/templates/server/doc_list.html
@@ -61,7 +61,7 @@
</div>
<div class="input-field col s3">
<label>
- <input name="filter_public" type="checkbox" class="filled-in" {{public_check}}/>
+ <input name="filter_wait" type="checkbox" class="filled-in" {{wait_check}}/>
<span><i class="material-icons left">timelapse</i>In Attesa</span>
</label>
</div>
@@ -73,31 +73,29 @@
</div>
<div class="input-field col s3">
<label>
- <input name="filter_personal" type="checkbox" class="filled-in" {{personal_check}}/>
+ <input name="filter_ok" type="checkbox" class="filled-in" {{ok_check}}/>
<span><i class="material-icons left">check</i>Approvati</span>
</label>
</div>
</div>
<div class="row">
<div class="input-field col s6">
- <label for="tetanus_date">Pi&ugrave; recenti di</label>
- <input value="{{tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text" class="datepicker">
+ <label for="newer">Pi&ugrave; recenti di</label>
+ <input value="{{newer}}" name="newer" id="newer" type="text" class="datepicker">
</div>
<div class="input-field col s6">
- <label for="tetanus_date">Pi&ugrave; vecchi di</label>
- <input value="{{tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text" class="datepicker">
+ <label for="older">Pi&ugrave; vecchi di</label>
+ <input value="{{older}}" name="older" id="older" type="text" class="datepicker">
</div>
</div>
- <div class ="row">
- <div class="input-field col s12">
- <input value="{{misc}}" name="misc" id="misc" type="text" data-length="250">
- <label for="misc">Tipo di documento</label>
+ <div class = "row">
+ <div class="col s12">
+ <div id="chips_type" class="chips chips-placeholder chips-autocomplete"></div>
</div>
</div>
- <div class ="row">
- <div class="input-field col s12">
- <input value="{{misc}}" name="misc" id="misc" type="text" data-length="250">
- <label for="misc">Proprietario del documento</label>
+ <div class ="row col s12">
+ <div class="col s12">
+ <div id="chips_owner" class="chips chips-placeholder chips-autocomplete "></div>
</div>
</div>
</div>
@@ -202,6 +200,34 @@ $(document).ready(function(){
M.toast({html: '{{ error_text}}', classes: 'orange'})
{% endif %}
});
+$('.chips').chips();
+$('#chips_type').chips({
+ placeholder: 'Tipo',
+ secondaryPlaceholder: '+Altro tipo',
+ autocompleteOptions: {
+ data: {
+ {% for t in types %}
+ '{{t.name}}': null,
+ {% endfor %}
+ },
+ limit: Infinity,
+ minLength: 0
+ }
+});
+$('#chips_owner').chips({
+ placeholder: 'Utente',
+ secondaryPlaceholder: '+Altro utente',
+ autocompleteOptions: {
+ data: {
+ {% for user in users %}
+ '{{user.first_name}} {{user.last_name}}': null,
+ {% endfor %}
+ },
+ limit: Infinity,
+ minLength: 0
+ }
+});
+
function send(id) {
var form = document.getElementById('selection')
var action = document.getElementById('action')
@@ -221,6 +247,7 @@ $('#select-all').click(function(event) {
}
});
var options = {
+ showClearBtn: true,
container: document.getElementById('main'),
yearRange:100,
format:'dd mmmm yyyy',
@@ -233,6 +260,7 @@ var options = {
today: 'Oggi',
clear: 'Cancella',
close: 'Chiudi',
+ cancel: 'Annulla',
firstDay: 1,
format: 'dddd d mmmm yyyy',
formatSubmit: 'yyyy/mm/dd',