utente.welcome.html 4.9 KB

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