utente.edit.document.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <div class="tab-pane fade" id="document-pane" role="tabpanel" aria-labelledby="document-tab" tabindex="0">
  2. <!-- documenti -->
  3. <div class='form-outline mb-3 text-center btn-primary h3'>
  4. Elenco Documenti Associati
  5. </div>
  6. <table class='table table-striped table-hover'>
  7. <thead class='thead-dark'>
  8. <tr>
  9. <th scope='col'>Documento</th>
  10. <th scope='col'>Storage</th>
  11. <th scope='col'>Descrizione</th>
  12. <th scope='col'>Inserimento</th>
  13. <th scope='col'>Elimina</th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. {% for documento in documentiUtente %}
  18. <tr>
  19. <td> {{ documento.documento }} </td>
  20. <td> {{ documento.storage}} </td>
  21. <td> {{ documento.descrizione }} </td>
  22. <td> {{ documento.dataupload | date:'d/m/Y' }} </td>
  23. <!-- <td> <input class='btn btn-primary' type='submit' name='Elimina' value='{{ documento.id }}'></td> -->
  24. <td> <button type='button' class='btn btn-primary active' onclick="window.open('{% url "documento:finalize" documento.id uid %}')">Vedi</button>
  25. <button type='button' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#ConfirmDeleteModal{{ documento.id }}' value='{{ documento.id }}'>Elimina!</button></td>
  26. <td>
  27. <!-- Modal -->
  28. <div class="modal fade" id="ConfirmDeleteModal{{ documento.id }}" tabindex="-1" role="dialog" aria-labelledby="ConfirmDeleteLabel{{ document.id }}" aria-hidden="true">
  29. <div class="modal-dialog" role="document">
  30. <div class="modal-content">
  31. <div class="modal-header">
  32. <h5 class="modal-title" id="ConfirmDeleteLabel">Conferma Cancellazione</h5>
  33. <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
  34. <span aria-hidden="true">&times;</span>
  35. </button>
  36. </div>
  37. <div class="modal-body">
  38. Confermi la cancellazione di {{ documento.documento }}?<br>
  39. La cancellazione del documento è definitiva,immediata e non recuperabile.
  40. </div>
  41. <div class="modal-footer">
  42. <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
  43. <form name='ConfirmDeleteModal' method='POST'>
  44. {% csrf_token %}
  45. <button type="submit" name="DeleteDocument" value='{{ documento.id }}' class="btn btn-primary">Conferma</button>
  46. </form>
  47. </div>
  48. </div>
  49. </div>
  50. <!-- end modal -->
  51. </td>
  52. </tr>
  53. {% endfor %}
  54. </tbody>
  55. </table>
  56. <form name='fileManager' method="POST" enctype='multipart/form-data'>
  57. {% csrf_token %}
  58. <table class='table table-striped table-hover'>
  59. <tbody>
  60. <tr>
  61. <td><label for='descrizione'>Descrizione:&nbsp;</label>
  62. <input type='text' name='descrizione' id='descrizione' value=''>
  63. <input type='file' class="btn btn-primary" name='allegati' id='allegati' value='{{ uf.allegati }}' accept='application/pdf' multiple></td>
  64. <td><input class="btn btn-primary" type='submit' value='Inserisci'></td>
  65. </tr>
  66. </table>
  67. </form>
  68. {% if listaok %}
  69. <table class='table table-striped table-hover'>
  70. <thead class='thead-dark'>
  71. <tr>
  72. <th scope='col'>Documento caricato con successo</th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. {% for l in listaok %}
  77. <tr>
  78. <td> {{ l }} </td>
  79. </tr>
  80. {% endfor %}
  81. </tbody>
  82. </table>
  83. {% endif %}
  84. <div><br><br></div>
  85. {% if listanotok %}
  86. <table class='table table-striped table-hover'>
  87. <thead class='thead-dark'>
  88. <tr>
  89. <th scope='col'>Documento non caricato perche già presente</th>
  90. </tr>
  91. </thead>
  92. <tbody>
  93. {% for l in listanotok %}
  94. <tr>
  95. <td> {{ l }} </td>
  96. </tr>
  97. {% endfor %}
  98. </tbody>
  99. </table>
  100. {% endif %}
  101. </div>