utente.download.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. {% extends 'base.html' %}
  2. {% block headersupplement %}
  3. <script language="JavaScript">
  4. function toggle(source) {
  5. checkboxes = document.getElementsByName('MultipleDocumentSelect');
  6. for(var i=0, n=checkboxes.length;i<n;i++) {
  7. checkboxes[i].checked = source.checked;
  8. }
  9. }
  10. </script>
  11. {% endblock %}
  12. {% block top %}
  13. <div class='form-outline mb-3 text-center btn-primary h3'>
  14. {{ HeaderTitle }}
  15. </div>
  16. <div class='form-outline mb-3 text-center btn-primary h3'>
  17. Area Utente {{ azienda.azienda }}
  18. </div>
  19. {% endblock %}
  20. {% block body %}
  21. <!-- Nav tabs -->
  22. <ul class="nav nav-tabs" id="myTab" role="tablist">
  23. <li class="nav-item" role="presentation">
  24. <button class="btn btn-primary active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Documenti</button>
  25. </li>
  26. <li class="nav-item" role="presentation">
  27. <button class="btn btn-primary" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profilo</button>
  28. </li>
  29. <li class="nav-item" role="presentation">
  30. <button class="btn btn-primary" id="messages-tab" data-bs-toggle="tab" data-bs-target="#messages" type="button" role="tab" aria-controls="messages" aria-selected="false">Attività</button>
  31. <li>
  32. <li class="nav-item" role="presentation">
  33. <button class="btn btn-primary" id="messages-tab" data-bs-toggle="tab" data-bs-target="#byebye" type="button" role="tab" aria-controls="byebye" aria-selected="false">Uscita</button>
  34. </li>
  35. </ul>
  36. <! -- end nav tabs -->
  37. <!-- Tab panes -->
  38. <div class="tab-content">
  39. <div class="tab-pane active" id="home" role="tabpanel" aria-labelledby="home-tab" tabindex="0">
  40. <div><br><br></div>
  41. <div class='form-outline mb-3 text-center btn-primary h3'>
  42. Documenti Disponibili al Download
  43. </div>
  44. <div>
  45. <form name="ElencoDocumenti" method="POST">
  46. {% csrf_token %}
  47. <table class='table table-striped table-hover'>
  48. <thead class='thead-dark'>
  49. <tr>
  50. <th scope='col'>Documento</th>
  51. <th scope='col'>Descrizione</th>
  52. <th scope='col'>Data Caricamento</th>
  53. <th scope='col'><input class="form-check-input" type="checkbox" id="selectAll" name="selectAll" value='0' onClick="toggle(this);"/>&nbsp;<label for='selectAll' class='form-check-label'>Tutti</label></th>
  54. </tr>
  55. </thead>
  56. <tbody>
  57. {% for documento in documentiUtente %}
  58. <tr>
  59. <td> <button type='button' class='btn btn-primary btn-block mb-2 active' onclick="window.open('{% url "documento:finalize" documento.id utente.id %}')">{{ documento.documento }}</button></td>
  60. <td> {{ documento.descrizione }} </td>
  61. <td> {{ documento.dataupload }} </td>
  62. <td><input class="form-check-input" type="checkbox" id="select-{{ documento.id}}" name="MultipleDocumentSelect" value='{{ documento.id }}'/></td>
  63. </tr>
  64. {% endfor %}
  65. </tbody>
  66. </table>
  67. <input type='submit' class="btn btn-primary" name='ScaricaSelezionati' value="ScaricaSelezionati"/>
  68. </form>
  69. </div>
  70. </div>
  71. <div class="tab-pane" id="profile" role="tabpanel" aria-labelledby="profile-tab" tabindex="0">
  72. <div><br><br></div>
  73. <div class='form-outline mb-3 text-center btn-primary h3'>
  74. Profilo Personale
  75. </div>
  76. <form name='download' method='post' class='form-container card p-3 bg-light'>
  77. {% csrf_token %}
  78. <div class='form-outline mb-3'>
  79. <label class='form-label' for='nome'>nome</label>
  80. <input type='text' class='form-control' id='nome' name='nome' value='{{ utente.nome }}' readonly>
  81. </div>
  82. <div class='form-outline mb-3'>
  83. <label class='form-label' for='cfisc'>nome</label>
  84. <input type='text' class='form-control' id='cfisc' name='cfisc' value='{{ utente.codicefiscale }}' readonly>
  85. </div>
  86. <div class='form-outline mb-3'>
  87. <label class='form-label' for='luogonascita'>Luogo di Nascita</label>
  88. <input type='text' class='form-control' id='luogonascita' name='luogonascita' value='{{ utente.luogonascita }}' readonly>
  89. </div>
  90. <div class='form-outline mb-3'>
  91. <label class='form-label' for='datanascita'>Data di Nascita</label>
  92. <input type='text' class='form-control' id='datanascita' name='datanascita' value='{{ utente.datanascita }}' readonly>
  93. </div>
  94. <div class='form-outline mb-3'>
  95. <label class='form-label' for='pin'>pin/Password</label>
  96. <input type='text' class='form-control' id='pin' name='pin' value='{{ utente.pin }}'>
  97. </div>
  98. <div class='form-outline mb-3'>
  99. <label class='form-label' for='mail'>Mail</label>
  100. <input type='text' class='form-control' id='mail' name='mail' value='{{ utente.mail }}'>
  101. </div>
  102. <div>
  103. <input type='submit' class="btn btn-primary" name='aggiorna' value='Aggiorna'/>
  104. <input type='submit' class="btn btn-primary" name="indietro" value="Logout">
  105. </div>
  106. </form>
  107. </div>
  108. <div class="tab-pane" id="messages" role="tabpanel" aria-labelledby="messages-tab" tabindex="0">
  109. <div><br><br></div>
  110. <div class='form-outline mb-3 text-center btn-primary h3'>
  111. Ultime attività registrate
  112. </div>
  113. <div>
  114. <table class='table table-striped table-hover mb-2'>
  115. <thead class='thead-dark'>
  116. <tr>
  117. <th scope='col'>Data</th>
  118. <th scope='col'>Causale</th>
  119. <th scope='col'>Utente</th>
  120. <th scope='col'>Amministratore</th>
  121. <th scope='col'>documento</th>
  122. </tr>
  123. </thead>
  124. <tbody>
  125. {% for attivita in listaAttivita %}
  126. <tr>
  127. <td> {{ attivita.data | date:'d/m/Y H:i' }} </td>
  128. <td> {{ attivita.causale.nome }} </td>
  129. <td> {{ attivita.utente.nome }} </td>
  130. <td> {{ attivita.amministratore.name }}</td>
  131. <td> {{ attivita.documento.documento }}</td>
  132. </tr>
  133. {% endfor %}
  134. </tbody>
  135. </table>
  136. </div>
  137. </div>
  138. <div class="tab-pane" id="byebye" role="tabpanel" aria-labelledby="byebye-tab" tabindex="0">
  139. <div><br><br></div>
  140. <div class='form-outline mb-3 text-center btn-primary h3'>
  141. <a href="{% url 'login:start' %}">Fine Sessione</a>
  142. </div>
  143. <div class='form-outline mb-3 text-center btn-primary h3'>
  144. Grazie per aver usato i nostri servizi
  145. </div>
  146. </div>
  147. </div>
  148. {% endblock %}
  149. {% block bottom %}
  150. {% if mailnonvalida %}
  151. <div class='text-center h5'>
  152. <b>Attenzione, la mail non risulta inserita/corretta. Si prega di correggerla cliccando sul tasto "Profilo".</b>
  153. </div>
  154. {% endif %}
  155. {% endblock %}