amministratore.welcome.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. {% extends 'base.html' %}
  2. {% block body %}
  3. <form name="inputUtente" method="POST">
  4. <div class='form-control'>
  5. {% if admin.crea_amministratore %}
  6. <input type='submit' class="btn btn-primary" name='scelta' 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 per questa azienda {{ numeroRecordAttuali }} su un totale di {{ numeroRecordAmministratore }}.
  12. </div>
  13. {% csrf_token %}
  14. <table class='table table-striped table-hover'>
  15. <thead class='thead-dark'>
  16. <tr>
  17. {% if admin.edit_amministratore %}<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 admin.edit_amministratore %}
  22. <th scope='col'>Pin</th>
  23. {% endif %}
  24. <th scope='col'>Inserimento</th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. {% csrf_token %}
  29. {% for aa in listaAmministratoreAzienda %}
  30. <tr>
  31. {% if admin.edit_utente %}
  32. <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>
  33. {% endif %}
  34. <td> {{ aa.amministratore.login }} </td>
  35. <td> {{ aa.amministratore.nome }} </td>
  36. <td> {{ aa.amministratore.mail }} </td>
  37. {% if admin.edit_amministratore %}
  38. <td> {{ aa.amministratore.pin }} </td>
  39. {% endif %}
  40. </tr>
  41. {% endfor %}
  42. </tbody>
  43. </table>
  44. </form>
  45. {% if admin.crea_amministratore %}
  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 bodybottom %}
  88. <div><br><br></div>
  89. {% if listaok %}
  90. <table class='table table-striped table-hover'>
  91. <thead class='thead-dark'>
  92. <tr>
  93. <th scope='col'>Documento caricato con successo</th>
  94. </tr>
  95. </thead>
  96. <tbody>
  97. {% for l in listaok %}
  98. <tr>
  99. <td> {{ l }} </td>
  100. </tr>
  101. {% endfor %}
  102. </tbody>
  103. </table>
  104. {% endif %}
  105. <div><br><br></div>
  106. {% if listanotok %}
  107. <table class='table table-striped table-hover'>
  108. <thead class='thead-dark'>
  109. <tr>
  110. <th scope='col'>Documento non caricato perche già presente</th>
  111. </tr>
  112. </thead>
  113. <tbody>
  114. {% for l in listanotok %}
  115. <tr>
  116. <td> {{ l }} </td>
  117. </tr>
  118. {% endfor %}
  119. </tbody>
  120. </table>
  121. {% endif %}
  122. {% if listaok %}
  123. {% for i in listaok %}
  124. {{i }}
  125. {% endfor %}
  126. {% endif %}
  127. {% if listanotok %}
  128. {% for i in listanotok %}
  129. {{i }}
  130. {% endfor %}
  131. {% endif %}
  132. {% endblock %}