amministratore.welcome.html 4.4 KB

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