documento.welcome.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. {% extends "base.html" %}
  2. {% block top %}
  3. <div class='form-outline mb-3 text-center btn-primary h3'>
  4. {{ HeaderTitle }}
  5. </div>
  6. <div clasS='form-outline mb-3 text-center btn-primary h3'>
  7. Azienda in elaborazione: {{ azienda.nome }}
  8. </div>
  9. <div clasS='form-outline mb-3 text-center btn-primary h3'>
  10. Amministratore: {{ admin.username }}
  11. </div>
  12. {% endblock %}
  13. {% block body %}
  14. {% if upload_ok %}
  15. <div>
  16. Sono stati caricati {{ xx }} documenti.
  17. Sono stati correttamente assegnati {{ xx }} documenti ai rispettivi utenti.
  18. <table class='table table-striped table-hover'>
  19. </table>
  20. I seguenti documenti non risultano assegnabili:
  21. <table class='table table-striped table-hover'>
  22. </table>
  23. {% endif %}
  24. {% if ElencoDocumentiPerAzienda %}
  25. <table class='table table-striped table-hover'>
  26. <thead class='thead-dark'>
  27. <tr>
  28. <th scope='col'><input type='checkbox' class='form-check-input' value='0' name='selezione'></th>
  29. <th scope='col'>Vedi</th>
  30. <th scope='col'>Utente associato</th>
  31. <th scope='col'>Documento</th>
  32. <th scope='col'>Descrizione</th>
  33. <th scope='col'>Inserimento</th>
  34. <th scope='col'>Cancella</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. {% for documento in ElencoDocumentiPerAzienda %}
  39. <tr>
  40. <td><input type='checkbox' class='form-check-input' value='{{ documento.id }}' name='selezione'></td>
  41. <td> <button type='button' class='btn btn-primary btn-block btn-lg mb-2 active' onclick="window.open('{% url "documento:finalize" documento.id documento.utente.id%}')">Vedi</button></td>
  42. <td> {{ documento.utente.nome }} </td>
  43. <td> {{ documento.documento }} </td>
  44. <td> {{ uu.descrizione }} </td>
  45. <td> {{ documento.dataupload | date:'d/m/Y' }} </td>
  46. <td><button type='button' class='btn btn-secondary' data-bs-toggle='modal' data-bs-target='#ConfirmDeleteModal{{ documento.id }}' value='{{ documento.id }}'>Elimina</button></td>
  47. </tr>
  48. <!-- Modal -->
  49. <div class="modal fade" id="ConfirmDeleteModal{{ documento.id }}" tabindex="-1" role="dialog" aria-labelledby="ConfirmDeleteLabel{{ document.id }}" aria-hidden="true">
  50. <div class="modal-dialog" role="document">
  51. <div class="modal-content">
  52. <div class="modal-header">
  53. <h5 class="modal-title" id="ConfirmDeleteLabel">Conferma Cancellazione</h5>
  54. <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
  55. <span aria-hidden="true">&times;</span>
  56. </button>
  57. </div>
  58. <div class="modal-body">
  59. Confermi la cancellazione di {{ documento.documento }}?<br>
  60. La cancellazione del documento è definitiva,immediata e non recuperabile.
  61. </div>
  62. <div class="modal-footer">
  63. <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
  64. <form name='ConfirmDeleteModal' method='POST'>
  65. {% csrf_token %}
  66. <button type="submit" name="DeleteDocument" value='{{ documento.id }}' class="btn btn-primary">Conferma</button>
  67. </form>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <!-- end modal -->
  73. {% endfor %}
  74. </tbody>
  75. </table>
  76. {% endif %}
  77. {% endblock %}
  78. {% block bodybottom %}
  79. <div>
  80. <br>
  81. </div>
  82. <div class='card'>
  83. <div class='card-body'>
  84. <h5 class="card-title">Upload Indici e Documenti</h5>
  85. <form name='upload' method='post' enctype='multipart/form-data'>
  86. {% csrf_token %}
  87. <table class='table table-striped table-hover'>
  88. <tbody>
  89. <tr>
  90. <td><label for='indice'>Indice Utenti:&nbsp;</label>
  91. <input type='file' class="btn btn-primary" name='indice' id='indice' value='{{ uf.indice }}' accept='text/csv'></td>
  92. <td><label for='descrizione'>Descrizione:&nbsp;</label>
  93. <input type='text' name='descrizione' id='descrizione' value=''>
  94. <input type='file' class="btn btn-primary" name='allegati' id='allegati' value='{{ uf.allegati }}' accept='application/pdf' multiple></td>
  95. </tr>
  96. </table>
  97. <table>
  98. <tr>
  99. <td><input type='submit' class="btn btn-primary" value='Inserisci'><td>
  100. <td><input type='submit' class="btn btn-primary" name='ritorna' value='Ritorna'></td>
  101. </tr>
  102. </table>
  103. </tbody>
  104. </form>
  105. </div>
  106. </div>
  107. <div><br><br></div>
  108. {% if listaok %}
  109. <table class='table table-striped table-hover'>
  110. <thead class='thead-dark'>
  111. <tr>
  112. <th scope='col'>Documento caricato con successo</th>
  113. </tr>
  114. </thead>
  115. <tbody>
  116. {% for l in listaok %}
  117. <tr>
  118. <td> {{ l }} </td>
  119. </tr>
  120. {% endfor %}
  121. </tbody>
  122. </table>
  123. {% endif %}
  124. <div><br><br></div>
  125. {% if listanotok %}
  126. <table class='table table-striped table-hover'>
  127. <thead class='thead-dark'>
  128. <tr>
  129. <th scope='col'>Documento non caricato perche già presente</th>
  130. </tr>
  131. </thead>
  132. <tbody>
  133. {% for l in listanotok %}
  134. <tr>
  135. <td> {{ l }} </td>
  136. </tr>
  137. {% endfor %}
  138. </tbody>
  139. </table>
  140. {% endif %}
  141. {% endblock %}