From 368de334478e1987a838bbe3a6f8c90b7d0e38e4 Mon Sep 17 00:00:00 2001 From: Andrea Fazzi Date: Mon, 3 Feb 2020 12:52:56 +0100 Subject: [PATCH] Improve response UI --- dist/main.bundle.js | 10 +++++++--- docker/oef_test/sql/oef_test.sql | 2 +- orm/response.go | 7 ++++++- renderer/funcmap.go | 8 ++++---- src/index.js | 8 ++++++-- templates/participants_show.html.tpl | 2 +- templates/responses_add_update.html.tpl | 8 ++++---- templates/responses_show.html.tpl | 2 +- 8 files changed, 30 insertions(+), 17 deletions(-) diff --git a/dist/main.bundle.js b/dist/main.bundle.js index 23c67441..a244e352 100644 --- a/dist/main.bundle.js +++ b/dist/main.bundle.js @@ -77,9 +77,13 @@ $(function () { setInterval(function() { var timeleft = parseInt($("#timeleft").html()); - timeleft--; + if (timeleft > 0) { + timeleft--; + } else { + timeleft = 0; + } $("#timeleft").html(timeleft) - }, 1000*60); + }, 1000); $("#myInput").on("keyup", function(eventObject) { @@ -137,4 +141,4 @@ $(function () { /***/ }) /******/ ]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgMjI4YzZmY2FmOTU3YWYxODYxYjIiLCJ3ZWJwYWNrOi8vLy4vc3JjL2luZGV4LmpzIiwid2VicGFjazovLy8uL3NyYy9zdHlsZS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtRQUFBO1FBQ0E7O1FBRUE7UUFDQTs7UUFFQTtRQUNBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQTs7UUFFQTtRQUNBOztRQUVBO1FBQ0E7O1FBRUE7UUFDQTtRQUNBOzs7UUFHQTtRQUNBOztRQUVBO1FBQ0E7O1FBRUE7UUFDQTtRQUNBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQSxLQUFLO1FBQ0w7UUFDQTs7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0dmFyIG1vZGFsRWwgPSAkKCcja2FybWVuLW1vZGFsLXJlbW92ZScpO1xuXHRcblx0dmFyIGVsID0gJCh0aGlzKTtcblxuXHRtb2RhbEVsLm1vZGFsKHtiYWNrZHJvcDogJ3N0YXRpYyd9KS5vbmUoJ2NsaWNrJywgJyNrYXJtZW4tbW9kYWwtYnRuLWNvbmZpcm0nLCBmdW5jdGlvbigpIHtcblx0ICAgIFxuXHQgICAgJC5hamF4KHtcblx0XHR1cmw6IHVybCxcblx0XHR0eXBlOiAnREVMRVRFJyxcblx0XHRzdWNjZXNzOiBmdW5jdGlvbihyZXN1bHQpIHtcblx0XHQgICAgbW9kYWxFbC5tb2RhbCgnaGlkZScpO1xuXHRcdCAgICB3aW5kb3cubG9jYXRpb24ucmVwbGFjZShyZXN1bHQucmVkaXJlY3RfdXJsKTtcblx0XHR9XG5cdCAgICB9KTtcblx0ICAgIFxuXHR9KTtcblx0XG5cdHJldHVybiBmYWxzZTtcbiAgICB9O1xuICAgIFxuICAgICQoXCIua2FybWVuLWFqYXgtZGVsZXRlXCIpLm9uKFwiY2xpY2tcIiwgZGVsZXRlSGFuZGxlcik7XG5cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9zcmMvaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLy8gcmVtb3ZlZCBieSBleHRyYWN0LXRleHQtd2VicGFjay1wbHVnaW5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NyYy9zdHlsZS5jc3Ncbi8vIG1vZHVsZSBpZCA9IDFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/docker/oef_test/sql/oef_test.sql b/docker/oef_test/sql/oef_test.sql index e80c8f08..93f55583 100644 --- a/docker/oef_test/sql/oef_test.sql +++ b/docker/oef_test/sql/oef_test.sql @@ -41,7 +41,7 @@ CREATE TABLE `answers` ( LOCK TABLES `answers` WRITE; /*!40000 ALTER TABLE `answers` DISABLE KEYS */; -INSERT INTO `answers` VALUES (1,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'il suo reddito',1,1),(2,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'il suo patrimonio',0,1),(3,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la sua ricchezza complessiva',0,1),(4,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la sua capacità di risparmio',0,1),(5,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'85%',1,2),(6,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'75%',0,2),(7,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'70%',0,2),(8,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'80%',0,2),(9,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'famiglie, imprese, Stato, resto del mondo',1,3),(10,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'famiglie, resto del mondo, Stato, banche',0,3),(11,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'famiglie, imprese, banche e resto del mondo',0,3),(12,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'famiglie, Stato, importazioni e imprese',0,3),(13,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'350 €',1,4),(14,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'300 €',0,4),(15,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'250 €',0,4),(16,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'200 €',0,4),(17,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'obbligazionista',1,5),(18,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'lavoratore salariato',0,5),(19,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'azionista',0,5),(20,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'proprietario terriero',0,5),(21,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'aumenta',1,6),(22,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminuisce',0,6),(23,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'rimane costante',0,6),(24,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminusce in misura minore',0,6),(25,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dall\'utilità dell\'ultima unità di bene che si sta per acquistare',1,7),(26,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dall\'utilità in media del bene acquistato',0,7),(27,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dall\'utilità totale fornita da quel tipo di bene',0,7),(28,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'nessuna delle risposte indicate',0,7),(29,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'maggiore è la scarsità di un bene e maggiore diventa la sua utilità e quindi il suo valore',1,8),(30,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'maggiore è la scarsità di un bene e maggiore è il suo consumo',0,8),(31,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'maggiore è la scarsità di un bene e maggiore diventa la sua utilità e quindi il suo valore',0,8),(32,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'maggioe è la scarsità di un bene e maggiore è l\'interesse del consumatore',0,8),(33,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'aumenta',1,9),(34,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminuisce',0,9),(35,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminuisce per poi tornare al livello precedente',0,9),(36,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'rimane invariato',0,9),(37,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminuisce',1,10),(38,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'rimane fissa',0,10),(39,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'aumenta',0,10),(40,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'prima aumenta e poi inizia a diminuire',0,10),(41,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'promuovere accordi sui prezzi delle materie prime con i paesi produttori',1,11),(42,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'rimane fissa',0,11),(43,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'aumenta',0,11),(44,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'prima aumenta e poi inizia a diminuire',0,11),(45,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'concedono prestti agli operatori economici a fronte dei depositati ricevuti',1,12),(46,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'raccolgono il risparmio e mettono a disposizione degli strumenti di pagamento come il bancomat',0,12),(47,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'emettono moneta avente corso legale',0,12),(48,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'emettono carte di credito continuamente ricaricabili',0,12),(49,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la quantità di moneta richiesta dai soggetti del sistema economico per transazioni, per ragioni speculative o prudenziali o per altri motivi',1,13),(50,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la quantità di moneta che viene richiesta dalle imprese sotto forma di prestiti richiesti al sistema bancario',0,13),(51,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la quantità di moneta richiesta dalla Banca Centrale quando mette in vendita dei titoli per ridurre la moneta in circolazione',0,13),(52,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la quantità di moneta richiesta dalle famiglie per mantenere in forma liquida i loro risparmi',0,13),(53,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un bene che fa parte del capitale fisso dell\'impresa',1,14),(54,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un bene immobile',0,14),(55,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un bene di consumo',0,14),(56,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un bene che fa parte del capitale circolante dell\'impresa',0,14),(57,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'imprese e mezzi di produzione appartengono ai privati e allo Stato',1,15),(58,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'imprese e mezzi di produzione appartengono ai privati',0,15),(59,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'imprese e mezzi di produzione appartengono allo Stato',0,15),(60,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'imprese e mezzi di produzione appartengono agli stranieri',0,15),(61,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'deficit',1,16),(62,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'utile',0,16),(63,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'pareggio',0,16),(64,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'avanzo',0,16),(65,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la concorrenza perfetta',1,17),(66,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'il monopolio',0,17),(67,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'l\'oligopolio',0,17),(68,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'tutte e tre le forme di mercato a seconda dei casi',0,17),(69,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dal prezzo del prodotto e dai costi di produzione',1,18),(70,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dal prezzo del prodotto',0,18),(71,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dai costi di produzione',0,18),(72,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dall\'andamento del mercato',0,18),(73,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'più alto che in libera concorrenza',1,19),(74,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'più basso che in libera concorrenza',0,19),(75,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'identico a quello in libera concorrenza',0,19),(76,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'variabile',0,19),(77,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'l\'attività di trasformazione materiale di beni e servizi (input) in altri (output) al fine di accrescerne l\'utilità',1,20),(78,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un ciclo economico',0,20),(79,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'l\'insieme dei beni di produzione',0,20),(80,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'il risultato del lavoro dei dipendenti dell\'impresa',0,20),(81,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'il suo reddito',1,21),(82,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'il suo patrimonio',0,21),(83,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la sua ricchezza complessiva',0,21),(84,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la sua capacità di risparmio',0,21),(85,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'85%',1,22),(86,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'75%',0,22),(87,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'70%',0,22),(88,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'80%',0,22),(89,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'famiglie, imprese, Stato, resto del mondo',1,23),(90,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'famiglie, resto del mondo, Stato, banche',0,23),(91,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'famiglie, imprese, banche e resto del mondo',0,23),(92,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'famiglie, Stato, importazioni e imprese',0,23),(93,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'350 €',1,24),(94,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'300 €',0,24),(95,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'250 €',0,24),(96,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'200 €',0,24),(97,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'obbligazionista',1,25),(98,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'lavoratore salariato',0,25),(99,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'azionista',0,25),(100,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'proprietario terriero',0,25),(101,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'aumenta',1,26),(102,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminuisce',0,26),(103,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'rimane costante',0,26),(104,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminusce in misura minore',0,26),(105,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dall\'utilità dell\'ultima unità di bene che si sta per acquistare',1,27),(106,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dall\'utilità in media del bene acquistato',0,27),(107,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dall\'utilità totale fornita da quel tipo di bene',0,27),(108,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'nessuna delle risposte indicate',0,27),(109,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'maggiore è la scarsità di un bene e maggiore diventa la sua utilità e quindi il suo valore',1,28),(110,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'maggiore è la scarsità di un bene e maggiore è il suo consumo',0,28),(111,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'maggiore è la scarsità di un bene e maggiore diventa la sua utilità e quindi il suo valore',0,28),(112,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'maggioe è la scarsità di un bene e maggiore è l\'interesse del consumatore',0,28),(113,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'aumenta',1,29),(114,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminuisce',0,29),(115,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminuisce per poi tornare al livello precedente',0,29),(116,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'rimane invariato',0,29),(117,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminuisce',1,30),(118,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'rimane fissa',0,30),(119,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'aumenta',0,30),(120,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'prima aumenta e poi inizia a diminuire',0,30),(121,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'promuovere accordi sui prezzi delle materie prime con i paesi produttori',1,31),(122,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'rimane fissa',0,31),(123,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'aumenta',0,31),(124,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'prima aumenta e poi inizia a diminuire',0,31),(125,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'concedono prestti agli operatori economici a fronte dei depositati ricevuti',1,32),(126,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'raccolgono il risparmio e mettono a disposizione degli strumenti di pagamento come il bancomat',0,32),(127,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'emettono moneta avente corso legale',0,32),(128,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'emettono carte di credito continuamente ricaricabili',0,32),(129,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la quantità di moneta richiesta dai soggetti del sistema economico per transazioni, per ragioni speculative o prudenziali o per altri motivi',1,33),(130,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la quantità di moneta che viene richiesta dalle imprese sotto forma di prestiti richiesti al sistema bancario',0,33),(131,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la quantità di moneta richiesta dalla Banca Centrale quando mette in vendita dei titoli per ridurre la moneta in circolazione',0,33),(132,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la quantità di moneta richiesta dalle famiglie per mantenere in forma liquida i loro risparmi',0,33),(133,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un bene che fa parte del capitale fisso dell\'impresa',1,34),(134,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un bene immobile',0,34),(135,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un bene di consumo',0,34),(136,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un bene che fa parte del capitale circolante dell\'impresa',0,34),(137,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'imprese e mezzi di produzione appartengono ai privati e allo Stato',1,35),(138,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'imprese e mezzi di produzione appartengono ai privati',0,35),(139,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'imprese e mezzi di produzione appartengono allo Stato',0,35),(140,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'imprese e mezzi di produzione appartengono agli stranieri',0,35),(141,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'deficit',1,36),(142,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'utile',0,36),(143,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'pareggio',0,36),(144,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'avanzo',0,36),(145,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la concorrenza perfetta',1,37),(146,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'il monopolio',0,37),(147,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'l\'oligopolio',0,37),(148,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'tutte e tre le forme di mercato a seconda dei casi',0,37),(149,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dal prezzo del prodotto e dai costi di produzione',1,38),(150,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dal prezzo del prodotto',0,38),(151,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dai costi di produzione',0,38),(152,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dall\'andamento del mercato',0,38),(153,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'più alto che in libera concorrenza',1,39),(154,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'più basso che in libera concorrenza',0,39),(155,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'identico a quello in libera concorrenza',0,39),(156,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'variabile',0,39),(157,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'l\'attività di trasformazione materiale di beni e servizi (input) in altri (output) al fine di accrescerne l\'utilità',1,40),(158,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un ciclo economico',0,40),(159,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'l\'insieme dei beni di produzione',0,40),(160,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'il risultato del lavoro dei dipendenti dell\'impresa',0,40); +INSERT INTO `answers` VALUES (1,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'il suo reddito',1,1),(2,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'il suo patrimonio',0,1),(3,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la sua ricchezza complessiva',0,1),(4,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la sua capacità di risparmio',0,1),(5,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'85%',1,2),(6,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'75%',0,2),(7,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'70%',0,2),(8,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'80%',0,2),(9,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'famiglie, imprese, Stato, resto del mondo',1,3),(10,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'famiglie, resto del mondo, Stato, banche',0,3),(11,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'famiglie, imprese, banche e resto del mondo',0,3),(12,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'famiglie, Stato, importazioni e imprese',0,3),(13,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'350 €',1,4),(14,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'300 €',0,4),(15,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'250 €',0,4),(16,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'200 €',0,4),(17,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'obbligazionista',1,5),(18,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'lavoratore salariato',0,5),(19,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'azionista',0,5),(20,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'proprietario terriero',0,5),(21,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'aumenta',1,6),(22,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminuisce',0,6),(23,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'rimane costante',0,6),(24,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminusce in misura minore',0,6),(25,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dall\'utilità dell\'ultima unità di bene che si sta per acquistare',1,7),(26,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dall\'utilità in media del bene acquistato',0,7),(27,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dall\'utilità totale fornita da quel tipo di bene',0,7),(28,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'nessuna delle risposte indicate',0,7),(29,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'maggiore è la scarsità di un bene e maggiore diventa la sua utilità e quindi il suo valore',1,8),(30,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'maggiore è la scarsità di un bene e maggiore è il suo consumo',0,8),(31,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'maggiore è la scarsità di un bene e maggiore diventa la sua utilità e quindi il suo valore',0,8),(32,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'maggiore è la scarsità di un bene e maggiore è l\'interesse del consumatore',0,8),(33,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'aumenta',1,9),(34,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminuisce',0,9),(35,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminuisce per poi tornare al livello precedente',0,9),(36,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'rimane invariato',0,9),(37,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'diminuisce',1,10),(38,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'rimane fissa',0,10),(39,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'aumenta',0,10),(40,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'prima aumenta e poi inizia a diminuire',0,10),(41,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'promuovere accordi sui prezzi delle materie prime con i paesi produttori',1,11),(42,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'rimane fissa',0,11),(43,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'aumenta',0,11),(44,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'prima aumenta e poi inizia a diminuire',0,11),(45,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'concedono prestti agli operatori economici a fronte dei depositati ricevuti',1,12),(46,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'raccolgono il risparmio e mettono a disposizione degli strumenti di pagamento come il bancomat',0,12),(47,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'emettono moneta avente corso legale',0,12),(48,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'emettono carte di credito continuamente ricaricabili',0,12),(49,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la quantità di moneta richiesta dai soggetti del sistema economico per transazioni, per ragioni speculative o prudenziali o per altri motivi',1,13),(50,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la quantità di moneta che viene richiesta dalle imprese sotto forma di prestiti richiesti al sistema bancario',0,13),(51,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la quantità di moneta richiesta dalla Banca Centrale quando mette in vendita dei titoli per ridurre la moneta in circolazione',0,13),(52,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la quantità di moneta richiesta dalle famiglie per mantenere in forma liquida i loro risparmi',0,13),(53,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un bene che fa parte del capitale fisso dell\'impresa',1,14),(54,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un bene immobile',0,14),(55,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un bene di consumo',0,14),(56,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un bene che fa parte del capitale circolante dell\'impresa',0,14),(57,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'imprese e mezzi di produzione appartengono ai privati e allo Stato',1,15),(58,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'imprese e mezzi di produzione appartengono ai privati',0,15),(59,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'imprese e mezzi di produzione appartengono allo Stato',0,15),(60,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'imprese e mezzi di produzione appartengono agli stranieri',0,15),(61,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'deficit',1,16),(62,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'utile',0,16),(63,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'pareggio',0,16),(64,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'avanzo',0,16),(65,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'la concorrenza perfetta',1,17),(66,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'il monopolio',0,17),(67,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'l\'oligopolio',0,17),(68,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'tutte e tre le forme di mercato a seconda dei casi',0,17),(69,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dal prezzo del prodotto e dai costi di produzione',1,18),(70,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dal prezzo del prodotto',0,18),(71,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dai costi di produzione',0,18),(72,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'dall\'andamento del mercato',0,18),(73,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'più alto che in libera concorrenza',1,19),(74,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'più basso che in libera concorrenza',0,19),(75,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'identico a quello in libera concorrenza',0,19),(76,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'variabile',0,19),(77,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'l\'attività di trasformazione materiale di beni e servizi (input) in altri (output) al fine di accrescerne l\'utilità',1,20),(78,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'un ciclo economico',0,20),(79,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'l\'insieme dei beni di produzione',0,20),(80,'2020-01-11 06:54:02','2020-01-11 06:54:02',NULL,'il risultato del lavoro dei dipendenti dell\'impresa',0,20),(81,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'il suo reddito',1,21),(82,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'il suo patrimonio',0,21),(83,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la sua ricchezza complessiva',0,21),(84,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la sua capacità di risparmio',0,21),(85,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'85%',1,22),(86,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'75%',0,22),(87,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'70%',0,22),(88,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'80%',0,22),(89,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'famiglie, imprese, Stato, resto del mondo',1,23),(90,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'famiglie, resto del mondo, Stato, banche',0,23),(91,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'famiglie, imprese, banche e resto del mondo',0,23),(92,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'famiglie, Stato, importazioni e imprese',0,23),(93,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'350 €',1,24),(94,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'300 €',0,24),(95,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'250 €',0,24),(96,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'200 €',0,24),(97,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'obbligazionista',1,25),(98,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'lavoratore salariato',0,25),(99,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'azionista',0,25),(100,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'proprietario terriero',0,25),(101,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'aumenta',1,26),(102,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminuisce',0,26),(103,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'rimane costante',0,26),(104,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminusce in misura minore',0,26),(105,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dall\'utilità dell\'ultima unità di bene che si sta per acquistare',1,27),(106,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dall\'utilità in media del bene acquistato',0,27),(107,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dall\'utilità totale fornita da quel tipo di bene',0,27),(108,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'nessuna delle risposte indicate',0,27),(109,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'maggiore è la scarsità di un bene e maggiore diventa la sua utilità e quindi il suo valore',1,28),(110,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'maggiore è la scarsità di un bene e maggiore è il suo consumo',0,28),(111,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'maggiore è la scarsità di un bene e maggiore diventa la sua utilità e quindi il suo valore',0,28),(112,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'maggioe è la scarsità di un bene e maggiore è l\'interesse del consumatore',0,28),(113,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'aumenta',1,29),(114,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminuisce',0,29),(115,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminuisce per poi tornare al livello precedente',0,29),(116,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'rimane invariato',0,29),(117,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'diminuisce',1,30),(118,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'rimane fissa',0,30),(119,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'aumenta',0,30),(120,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'prima aumenta e poi inizia a diminuire',0,30),(121,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'promuovere accordi sui prezzi delle materie prime con i paesi produttori',1,31),(122,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'rimane fissa',0,31),(123,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'aumenta',0,31),(124,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'prima aumenta e poi inizia a diminuire',0,31),(125,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'concedono prestti agli operatori economici a fronte dei depositati ricevuti',1,32),(126,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'raccolgono il risparmio e mettono a disposizione degli strumenti di pagamento come il bancomat',0,32),(127,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'emettono moneta avente corso legale',0,32),(128,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'emettono carte di credito continuamente ricaricabili',0,32),(129,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la quantità di moneta richiesta dai soggetti del sistema economico per transazioni, per ragioni speculative o prudenziali o per altri motivi',1,33),(130,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la quantità di moneta che viene richiesta dalle imprese sotto forma di prestiti richiesti al sistema bancario',0,33),(131,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la quantità di moneta richiesta dalla Banca Centrale quando mette in vendita dei titoli per ridurre la moneta in circolazione',0,33),(132,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la quantità di moneta richiesta dalle famiglie per mantenere in forma liquida i loro risparmi',0,33),(133,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un bene che fa parte del capitale fisso dell\'impresa',1,34),(134,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un bene immobile',0,34),(135,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un bene di consumo',0,34),(136,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un bene che fa parte del capitale circolante dell\'impresa',0,34),(137,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'imprese e mezzi di produzione appartengono ai privati e allo Stato',1,35),(138,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'imprese e mezzi di produzione appartengono ai privati',0,35),(139,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'imprese e mezzi di produzione appartengono allo Stato',0,35),(140,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'imprese e mezzi di produzione appartengono agli stranieri',0,35),(141,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'deficit',1,36),(142,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'utile',0,36),(143,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'pareggio',0,36),(144,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'avanzo',0,36),(145,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'la concorrenza perfetta',1,37),(146,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'il monopolio',0,37),(147,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'l\'oligopolio',0,37),(148,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'tutte e tre le forme di mercato a seconda dei casi',0,37),(149,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dal prezzo del prodotto e dai costi di produzione',1,38),(150,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dal prezzo del prodotto',0,38),(151,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dai costi di produzione',0,38),(152,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'dall\'andamento del mercato',0,38),(153,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'più alto che in libera concorrenza',1,39),(154,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'più basso che in libera concorrenza',0,39),(155,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'identico a quello in libera concorrenza',0,39),(156,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'variabile',0,39),(157,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'l\'attività di trasformazione materiale di beni e servizi (input) in altri (output) al fine di accrescerne l\'utilità',1,40),(158,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'un ciclo economico',0,40),(159,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'l\'insieme dei beni di produzione',0,40),(160,'2020-01-11 06:54:31','2020-01-11 06:54:31',NULL,'il risultato del lavoro dei dipendenti dell\'impresa',0,40); /*!40000 ALTER TABLE `answers` ENABLE KEYS */; UNLOCK TABLES; diff --git a/orm/response.go b/orm/response.go index 6317dc8c..dbd5cc36 100644 --- a/orm/response.go +++ b/orm/response.go @@ -132,7 +132,12 @@ func (model *Response) Read(db *Database, args map[string]string, w http.Respons id := args["id"] - if err := db._db.Preload("Contest").Preload("Participant").First(&response, id).Error; err != nil { + if err := db._db. + Preload("Contest"). + Preload("Participant"). + Preload("Creator"). + Preload("Updater"). + First(&response, id).Error; err != nil { return nil, err } diff --git a/renderer/funcmap.go b/renderer/funcmap.go index 3d9bec3d..7b87ded7 100644 --- a/renderer/funcmap.go +++ b/renderer/funcmap.go @@ -33,7 +33,7 @@ var ( "prettyTime": prettyTime, "prettyDateTime": prettyDateTime, "zeroTime": zeroTime, - "minutes": minutes, + "seconds": seconds, "modelPath": modelPath, "dict": dict, "yaml": yaml, @@ -50,7 +50,7 @@ var ( "mod2": mod2, "toLower": toLower, "anchor": anchor, - "alertLink": alertLink, + "alertLink": alertLink, "html": html, "field": field, "modelName": modelName, @@ -329,8 +329,8 @@ func zeroTime(t *time.Time) bool { return *t == time.Time{} } -func minutes(d time.Duration) int { - return int(d.Minutes()) +func seconds(d time.Duration) int { + return int(d.Seconds()) } func modelPath(model string, action string, id uint) string { diff --git a/src/index.js b/src/index.js index 736da1db..b8d03c8d 100644 --- a/src/index.js +++ b/src/index.js @@ -4,9 +4,13 @@ $(function () { setInterval(function() { var timeleft = parseInt($("#timeleft").html()); - timeleft--; + if (timeleft > 0) { + timeleft--; + } else { + timeleft = 0; + } $("#timeleft").html(timeleft) - }, 1000*60); + }, 1000); $("#myInput").on("keyup", function(eventObject) { diff --git a/templates/participants_show.html.tpl b/templates/participants_show.html.tpl index 803072e6..685149ae 100644 --- a/templates/participants_show.html.tpl +++ b/templates/participants_show.html.tpl @@ -97,7 +97,7 @@ icon: "fa fa-hourglass-start" `}} - {{$noElements := "Al partecipante non è associata alcuna risposta."}} + {{$noElements := "Al partecipante non è associata alcuna prova."}} {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Responses "noElements" $noElements}} diff --git a/templates/responses_add_update.html.tpl b/templates/responses_add_update.html.tpl index ca7b8b36..cadd463d 100644 --- a/templates/responses_add_update.html.tpl +++ b/templates/responses_add_update.html.tpl @@ -12,8 +12,6 @@ {{- end -}} {{- if $isAdmin -}} {{template "add_update_header" dict "update" $update "addTitle" "Rispondi al questionario" "updateTitle" (printf "Aggiorna %s" (.Data|string))}} - {{- else -}} - {{template "add_update_header" dict "update" $update "addTitle" "Rispondi al questionario" "updateTitle" (.Data|string)}} {{- end -}} {{- $form := "form_add_update" -}}
@@ -66,13 +64,15 @@
- Informazioni sulla gara + Informazioni sulla prova
Gara
{{.Data.Contest}}
Partecipante
{{.Data.Participant}}
-
Tempo rimanente
{{if and $isParticipant .Data.TimeLeft}}
{{.Data.TimeLeft.Minutes|toInt}} minuti rimanenti
{{else}}
La gara è sempre attiva
{{end}} + {{- if $isParticipant -}} +
Tempo rimanente
{{if .Data.TimeLeft}}
{{.Data.TimeLeft.Seconds|toInt}} secondi rimanenti
{{else}}
La gara è sempre attiva
{{end}} + {{- end -}}
diff --git a/templates/responses_show.html.tpl b/templates/responses_show.html.tpl index 20e30324..985de506 100644 --- a/templates/responses_show.html.tpl +++ b/templates/responses_show.html.tpl @@ -23,7 +23,7 @@
{{if not (.Data.Contest.Date|zeroTime)}} Giorno {{.Data.Contest.Date|prettyDate}} dalle ore {{.Data.Contest.StartTime|convertTime}} alle ore {{.Data.Contest.EndTime|convertTime}} - {{- if not .Data.IsActive -}} [Scaduta]{{- end -}} + {{- if not .Data.IsActive -}} [Scaduta o non ancora attiva]{{- end -}} {{else}} La gara è sempre attiva. {{end}}