amministratore.welcome.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. {% extends 'base.html' %}
  2. {% block body %}
  3. <form name="inputUtente" method="POST">
  4. <div class='form-control'>
  5. {% if "AMMINISTRATORE.CREA" in permesso %}
  6. <input type='submit' class="btn btn-primary" name='sceltanuovo' value='Nuovo Amministratore'>
  7. <button type='button' class="btn btn-primary" name='TastoCaricaIndici' data-bs-toggle='modal' data-bs-target='#CaricaIndiceModal'>Carica Lista Nuovi Amministratori</button>
  8. {% endif %}
  9. <input type='submit' class="btn btn-primary" name="indietro" value="Indietro">
  10. </div>
  11. <div class='form-control'>
  12. Numero di amministratori registrati {{ amministratorelistalen }}.
  13. </div>
  14. {% csrf_token %}
  15. <table class='table table-striped table-hover'>
  16. <thead class='thead-dark'>
  17. <tr>
  18. {% if "AMMINISTRATORE.EDIT" in permesso %}<th scope='col'>*</th>{% endif %}
  19. <th scope='col'>Login</th>
  20. <th scope='col'>Nome</th>
  21. <th scope='col'>Mail</th>
  22. {% if "AMMINISTRATORE.EDIT" in permesso %}
  23. <th scope='col'>Pin</th>
  24. {% endif %}
  25. </tr>
  26. </thead>
  27. <tbody>
  28. {% csrf_token %}
  29. {% for aa in amministratorelista %}
  30. <tr>
  31. {% if "AMMINISTRATORE.EDIT" in permesso %}
  32. <td> <button type='submit' class='btn btn-primary btn-block btn-lg mb-2 active' name='scelta' value='{{ aa.id }}' onchange="this.form.submit()">Edit</button></td>
  33. {% endif %}
  34. <td> {{ aa.login }} </td>
  35. <td> {{ aa.nome }} </td>
  36. <td> {{ aa.mail }} </td>
  37. {% if "AMMINISTRATORE.EDIT" in permesso %}
  38. <td> {{ aa.pin }} </td>
  39. {% endif %}
  40. </tr>
  41. {% endfor %}
  42. </tbody>
  43. </table>
  44. </form>
  45. {% if "AMMINISTRATORE.CREA" in permesso %}
  46. <!-- Modal -->
  47. <div class="modal fade" id="CaricaIndiceModal" tabindex="-1" role="dialog" aria-labelledby="CaricaIndiceLabel" aria-hidden="true">
  48. <div class="modal-dialog" role="document">
  49. <div class="modal-content">
  50. <form name='formCaricaIndice' method='POST' enctype='multipart/form-data'>
  51. {% csrf_token %}
  52. <div class="modal-header">
  53. <h5 class="modal-title" id="CaricaIndiceLabel">Carica Elenco Dipendenti</h5>
  54. <span aria-hidden="true">&times;</span>
  55. </button>
  56. </div>
  57. <div class="modal-body">
  58. Caricamento Lista Dipendenti<br>
  59. Formato File CSV - obbligatorio <br>
  60. Separatore: ',' - prima riga: "Nome colonna".</br>
  61. <table class='table table-striped table-hover'>
  62. <tbody>
  63. <tr>
  64. <td>Nome Cognome</td>
  65. <td>Codice Fiscale</td>
  66. <td>Data di Nascita</td>
  67. <td>Luogo di Nascita</td>
  68. <td/email</td>
  69. </tr>
  70. </tbody>
  71. </table><br>
  72. <label for='indice'>Elenco Dipendenti:&nbsp;</label>
  73. <input type='file' name='indice' id='indice' value='' accept='text/csv'>
  74. </div>
  75. <div class="modal-footer">
  76. <button type="submit" name="CaricaIndice" value='Carica Lista' class="btn btn-primary">Carica Lista Dipendenti</button>
  77. <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Annulla</button>
  78. </div>
  79. </form>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. <!-- end modal -->
  85. {% endif %}
  86. {% endblock %}
  87. {% block bottom %}
  88. {% if "AMMINISTRATORE.CREA" in permesso %}
  89. <!-- Modal -->
  90. <div class="modal fade" id="CaricaIndiceModal" tabindex="-1" role="dialog" aria-labelledby="CaricaIndiceLabel"
  91. aria-hidden="true">
  92. <div class="modal-dialog" role="document">
  93. <div class="modal-content">
  94. <form name='formCaricaIndice' method='POST' enctype='multipart/form-data'>
  95. {% csrf_token %}
  96. <div class="modal-header">
  97. <h5 class="modal-title" id="CaricaIndiceLabel">Carica Elenco Dipendenti</h5>
  98. <span aria-hidden="true">&times;</span>
  99. </button>
  100. </div>
  101. <div class="modal-body">
  102. Caricamento Lista Dipendenti<br>
  103. Formato File CSV - obbligatorio <br>
  104. Separatore: ';' - prima riga: "Nome colonna".</br>
  105. <table class='table table-striped table-hover'>
  106. <tbody>
  107. <tr>
  108. <td>Identificativo SEDE</td>
  109. <td>Nome Sede</td>
  110. </tr>
  111. </tbody>
  112. </table><br>
  113. <label for='indice'>Elenco Amministratori:&nbsp;</label>
  114. <input type='file' name='indice' id='indice' value='' accept='text/csv'>
  115. </div>
  116. <div class="modal-footer">
  117. <button type="submit" name="CaricaIndice" value='Carica Lista' class="btn btn-primary">Carica Li
  118. sta Dipendenti</button>
  119. <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Annulla</button>
  120. </div>
  121. </form>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. <!-- end modal -->
  127. {% endif %}
  128. <div><br><br></div>
  129. {% if listaok %}
  130. <table class='table table-striped table-hover'>
  131. <thead class='thead-dark'>
  132. <tr>
  133. <th scope='col'>Documento caricato con successo</th>
  134. </tr>
  135. </thead>
  136. <tbody>
  137. {% for l in listaok %}
  138. <tr>
  139. <td> {{ l }} </td>
  140. </tr>
  141. {% endfor %}
  142. </tbody>
  143. </table>
  144. {% endif %}
  145. <div><br><br></div>
  146. {% if listanotok %}
  147. <table class='table table-striped table-hover'>
  148. <thead class='thead-dark'>
  149. <tr>
  150. <th scope='col'>Documento non caricato perche già presente</th>
  151. </tr>
  152. </thead>
  153. <tbody>
  154. {% for l in listanotok %}
  155. <tr>
  156. <td> {{ l }} </td>
  157. </tr>
  158. {% endfor %}
  159. </tbody>
  160. </table>
  161. {% endif %}
  162. {% if listaok %}
  163. {% for i in listaok %}
  164. {{i }}
  165. {% endfor %}
  166. {% endif %}
  167. {% if listanotok %}
  168. {% for i in listanotok %}
  169. {{i }}
  170. {% endfor %}
  171. {% endif %}
  172. {% endblock %}