utente.welcome.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. {% extends 'base.html' %}
  2. {% block body %}
  3. <form name="inputUtente" method="POST">
  4. <div class='form-control'>
  5. {% if admin.crea_utente %}
  6. <input type='submit' class="btn btn-primary" name='scelta' value='Nuovo Dipendente'>
  7. <button type='button' class="btn btn-primary" name='TastoCaricaIndici' data-bs-toggle='modal' data-bs-target='#CaricaIndiceModal'>Carica Lista Nuovi Dipendenti</button>
  8. <button type='submit' class="btn btn-primary" name='ScaricaSelezionati' value="ScaricaSelezionati">Scarica Selezionati</button>
  9. {% endif %}
  10. <input type='submit' class="btn btn-primary" name="indietro" value="Indietro">
  11. </div>
  12. <div class='form-control'>
  13. Numero di dipendenti selezionati {{ numeroRecordAttuali }} su un totale di {{ numeroRecordAzienda }}.
  14. </div>
  15. {% csrf_token %}
  16. <table class='table table-striped table-hover'>
  17. <thead class='thead-dark'>
  18. <tr>
  19. {% if admin.edit_utente %}<th scope='col'>*</th>{% endif %}
  20. <th scope='col'>Nome</th>
  21. <th scope='col'>Codice Fiscale</th>
  22. <th scope='col'>Sede</th>
  23. <th scope='col'>Data di Nascita</th>
  24. <th scope='col'>Luogo di Nascita</th>
  25. <th scope='col'>documenti</th>
  26. {% if admin.edit_utente %}
  27. <th scope='col'>Mail</th>
  28. <th scope='col'>Pin</th>
  29. {% endif %}
  30. <th scope='col'>Inserimento</th>
  31. <th scope='col'><input class="form-check-input" type="checkbox" id="select" name="select" value='0'/></th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. {% csrf_token %}
  36. {% for uu in utenti %}
  37. <tr>
  38. {% if admin.edit_utente %}
  39. <td> <button type='submit' class='btn btn-primary btn-block btn-lg mb-2 active' name='scelta' value='{{ uu.id }}' {% if not admin.crea_utente %}disable{% endif %}>Edit</button></td>
  40. {% endif %}
  41. <td> {{ uu.nome }} </td>
  42. <td> {{ uu.codicefiscale }} </td>
  43. <td> {{ uu.sede.nome }} </td>
  44. <td> {{ uu.datanascita|date:'d/m/Y' }} </td>
  45. <td> {{ uu.luogonascita }} </td>
  46. <td> <a href='{% url 'documento:welcome' uu.id %}'>{{ uu.documenti }}</a></td>
  47. {% if admin.edit_utente %}
  48. <td> {{ uu.mail }} </td>
  49. <td> {{ uu.pin }} </td>
  50. {% endif %}
  51. <td> {{ uu.inserimento|date:'d/m/Y' }} </td>
  52. <td>
  53. <input class="form-check-input" type="checkbox" id="select" name="select" value='{{ uu.id }}'/>
  54. </td>
  55. </tr>
  56. {% endfor %}
  57. </tbody>
  58. </table>
  59. </form>
  60. {% if admin.crea_utente %}
  61. <!-- Modal -->
  62. <div class="modal fade" id="CaricaIndiceModal" tabindex="-1" role="dialog" aria-labelledby="CaricaIndiceLabel" aria-hidden="true">
  63. <div class="modal-dialog" role="document">
  64. <div class="modal-content">
  65. <form name='formCaricaIndice' method='POST' enctype='multipart/form-data'>
  66. {% csrf_token %}
  67. <div class="modal-header">
  68. <h5 class="modal-title" id="CaricaIndiceLabel">Carica Elenco Dipendenti</h5>
  69. <span aria-hidden="true">&times;</span>
  70. </button>
  71. </div>
  72. <div class="modal-body">
  73. Caricamento Lista Dipendenti<br>
  74. Formato File CSV - obbligatorio <br>
  75. Separatore: ';' - prima riga: "Nome colonna".</br>
  76. <table class='table table-striped table-hover'>
  77. <tbody>
  78. <tr>
  79. <td>Nome Cognome</td>
  80. <td>Codice Fiscale</td>
  81. <td>Data di Nascita</td>
  82. <td>Luogo di Nascita</td>
  83. <td>email</td>
  84. <td>Sede</td>
  85. </tr>
  86. </tbody>
  87. </table><br>
  88. <label for='indice'>Elenco Dipendenti:&nbsp;</label>
  89. <input type='file' name='indice' id='indice' value='' accept='text/csv'>
  90. </div>
  91. <div class="modal-footer">
  92. <button type="submit" name="CaricaIndice" value='Carica Lista' class="btn btn-primary">Carica Lista Dipendenti</button>
  93. <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Annulla</button>
  94. </div>
  95. </form>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <!-- end modal -->
  101. {% endif %}
  102. {% endblock %}
  103. {% block bodybottom %}
  104. <div><br><br></div>
  105. {% if listaok %}
  106. <table class='table table-striped table-hover'>
  107. <thead class='thead-dark'>
  108. <tr>
  109. <th scope='col'>Documento caricato con successo</th>
  110. </tr>
  111. </thead>
  112. <tbody>
  113. {% for l in listaok %}
  114. <tr>
  115. <td> {{ l }} </td>
  116. </tr>
  117. {% endfor %}
  118. </tbody>
  119. </table>
  120. {% endif %}
  121. <div><br><br></div>
  122. {% if listanotok %}
  123. <table class='table table-striped table-hover'>
  124. <thead class='thead-dark'>
  125. <tr>
  126. <th scope='col'>Documento non caricato perche già presente</th>
  127. </tr>
  128. </thead>
  129. <tbody>
  130. {% for l in listanotok %}
  131. <tr>
  132. <td> {{ l }} </td>
  133. </tr>
  134. {% endfor %}
  135. </tbody>
  136. </table>
  137. {% endif %}
  138. {% if listaok %}
  139. {% for i in listaok %}
  140. {{i }}
  141. {% endfor %}
  142. {% endif %}
  143. {% if listanotok %}
  144. {% for i in listanotok %}
  145. {{i }}
  146. {% endfor %}
  147. {% endif %}
  148. {% endblock %}