utente.edit.document.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. {% if admin.edit_documento %}
  26. <button type='button' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#ConfirmDeleteModal{{ documento.id }}' value='{{ documento.id }}'>Elimina!</button>
  27. {% endif %}</td>
  28. <td>
  29. {% if admin.edit_documento %}
  30. <!-- Modal -->
  31. <div class="modal fade" id="ConfirmDeleteModal{{ documento.id }}" tabindex="-1" role="dialog" aria-labelledby="ConfirmDeleteLabel{{ document.id }}" aria-hidden="true">
  32. <div class="modal-dialog" role="document">
  33. <div class="modal-content">
  34. <div class="modal-header">
  35. <h5 class="modal-title" id="ConfirmDeleteLabel">Conferma Cancellazione</h5>
  36. <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
  37. <span aria-hidden="true">&times;</span>
  38. </button>
  39. </div>
  40. <div class="modal-body">
  41. Confermi la cancellazione di {{ documento.documento }}?<br>
  42. La cancellazione del documento è definitiva,immediata e non recuperabile.
  43. </div>
  44. <div class="modal-footer">
  45. <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
  46. <form name='ConfirmDeleteModal' method='POST'>
  47. {% csrf_token %}
  48. <button type="submit" name="DeleteDocument" value='{{ documento.id }}' class="btn btn-primary">Conferma</button>
  49. </form>
  50. </div>
  51. </div>
  52. </div>
  53. <!-- end modal -->
  54. {% endif %}
  55. </td>
  56. </tr>
  57. {% endfor %}
  58. </tbody>
  59. </table>
  60. {% if admin.crea_documento %}
  61. <form name='fileManager' method="POST" enctype='multipart/form-data'>
  62. {% csrf_token %}
  63. <table class='table table-striped table-hover'>
  64. <tbody>
  65. <tr>
  66. <td><label for='descrizione'>Descrizione:&nbsp;</label>
  67. <input type='text' name='descrizione' id='descrizione' value=''>
  68. <input type='file' class="btn btn-primary" name='allegati' id='allegati' value='{{ uf.allegati }}' accept='application/pdf' multiple></td>
  69. <td><input class="btn btn-primary" type='submit' value='Inserisci'></td>
  70. </tr>
  71. </table>
  72. </form>
  73. {% endif %}
  74. {% if listaok %}
  75. <table class='table table-striped table-hover'>
  76. <thead class='thead-dark'>
  77. <tr>
  78. <th scope='col'>Documento caricato con successo</th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. {% for l in listaok %}
  83. <tr>
  84. <td> {{ l }} </td>
  85. </tr>
  86. {% endfor %}
  87. </tbody>
  88. </table>
  89. {% endif %}
  90. <div><br><br></div>
  91. {% if listanotok %}
  92. <table class='table table-striped table-hover'>
  93. <thead class='thead-dark'>
  94. <tr>
  95. <th scope='col'>Documento non caricato perche già presente</th>
  96. </tr>
  97. </thead>
  98. <tbody>
  99. {% for l in listanotok %}
  100. <tr>
  101. <td> {{ l }} </td>
  102. </tr>
  103. {% endfor %}
  104. </tbody>
  105. </table>
  106. {% endif %}
  107. </div>